From 390503bdb49139e83a0cbfd25a31c5fa36db5ca3 Mon Sep 17 00:00:00 2001 From: Michael Olbrich Date: Fri, 18 Jul 2014 07:22:39 -0300 Subject: [PATCH] [media] coda: use CODA_MAX_FRAME_SIZE everywhere Without this changing CODA_MAX_FRAME_SIZE to anything other than 0x100000 can break the bitstram handling Signed-off-by: Michael Olbrich Signed-off-by: Philipp Zabel Signed-off-by: Kamil Debski Signed-off-by: Mauro Carvalho Chehab --- drivers/media/platform/coda.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/platform/coda.c b/drivers/media/platform/coda.c index c25756e7eeaf..79c362bd8383 100644 --- a/drivers/media/platform/coda.c +++ b/drivers/media/platform/coda.c @@ -3104,7 +3104,7 @@ static void coda_finish_decode(struct coda_ctx *ctx) * by up to 512 bytes */ if (ctx->bit_stream_param & CODA_BIT_STREAM_END_FLAG) { - if (coda_get_bitstream_payload(ctx) >= 0x100000 - 512) + if (coda_get_bitstream_payload(ctx) >= CODA_MAX_FRAME_SIZE - 512) kfifo_init(&ctx->bitstream_fifo, ctx->bitstream.vaddr, ctx->bitstream.size); } -- 2.39.5