[FFmpeg-cvslog] r19136 - trunk/libavcodec/mpegvideo.c

lucabe subversion
Tue Jun 9 12:06:25 CEST 2009


Author: lucabe
Date: Tue Jun  9 12:06:25 2009
New Revision: 19136

Log:
Properly initialize AVFrames to default values in the MPEG decoder (fixes
the AVFrame pts when decoding MPEG 1 and 2 video)

Modified:
   trunk/libavcodec/mpegvideo.c

Modified: trunk/libavcodec/mpegvideo.c
==============================================================================
--- trunk/libavcodec/mpegvideo.c	Tue Jun  9 09:18:58 2009	(r19135)
+++ trunk/libavcodec/mpegvideo.c	Tue Jun  9 12:06:25 2009	(r19136)
@@ -554,6 +554,9 @@ av_cold int MPV_common_init(MpegEncConte
         }
     }
     CHECKED_ALLOCZ(s->picture, MAX_PICTURE_COUNT * sizeof(Picture))
+    for(i = 0; i < MAX_PICTURE_COUNT; i++) {
+        avcodec_get_frame_defaults((AVFrame *)&s->picture[i]);
+    }
 
     CHECKED_ALLOCZ(s->error_status_table, mb_array_size*sizeof(uint8_t))
 



More information about the ffmpeg-cvslog mailing list