From 3d5dc7d87df4753967591b803c1bddb13033ffc3 Mon Sep 17 00:00:00 2001 From: Nicolas George Date: Sat, 28 Jul 2012 19:36:21 +0200 Subject: [PATCH] mmvideo: count preamble size in return value. MM_PREAMBLE_SIZE is subtracted from buf_size almost immediately. The original size is still in avpkt->size. --- libavcodec/mmvideo.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/mmvideo.c b/libavcodec/mmvideo.c index abba29fb75..c79099471b 100644 --- a/libavcodec/mmvideo.c +++ b/libavcodec/mmvideo.c @@ -194,7 +194,7 @@ static int mm_decode_frame(AVCodecContext *avctx, } switch(type) { - case MM_TYPE_PALETTE : res = mm_decode_pal(s); return buf_size; + case MM_TYPE_PALETTE : res = mm_decode_pal(s); return avpkt->size; case MM_TYPE_INTRA : res = mm_decode_intra(s, 0, 0); break; case MM_TYPE_INTRA_HH : res = mm_decode_intra(s, 1, 0); break; case MM_TYPE_INTRA_HHV : res = mm_decode_intra(s, 1, 1); break; @@ -213,7 +213,7 @@ static int mm_decode_frame(AVCodecContext *avctx, *data_size = sizeof(AVFrame); *(AVFrame*)data = s->frame; - return buf_size; + return avpkt->size; } static av_cold int mm_decode_end(AVCodecContext *avctx)