[FFmpeg-cvslog] mmvideo: count preamble size in return value.

Nicolas George git at videolan.org
Tue Jul 31 17:35:56 CEST 2012


ffmpeg | branch: master | Nicolas George <nicolas.george at normalesup.org> | Sat Jul 28 19:36:21 2012 +0200| [3d5dc7d87df4753967591b803c1bddb13033ffc3] | committer: Nicolas George

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.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3d5dc7d87df4753967591b803c1bddb13033ffc3
---

 libavcodec/mmvideo.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavcodec/mmvideo.c b/libavcodec/mmvideo.c
index abba29f..c790994 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)



More information about the ffmpeg-cvslog mailing list