OSDN Git Service

[media] coda: use CODA_MAX_FRAME_SIZE everywhere
authorMichael Olbrich <m.olbrich@pengutronix.de>
Fri, 18 Jul 2014 10:22:39 +0000 (07:22 -0300)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Thu, 21 Aug 2014 20:25:19 +0000 (15:25 -0500)
Without this changing CODA_MAX_FRAME_SIZE to anything other than 0x100000
can break the bitstram handling

Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
drivers/media/platform/coda.c

index c25756e..79c362b 100644 (file)
@@ -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);
        }