diff mpegvideo.c @ 9828:6487152f17f2 libavcodec

Properly initialize AVFrames to default values in the MPEG decoder (fixes the AVFrame pts when decoding MPEG 1 and 2 video)
author lucabe
date Tue, 09 Jun 2009 10:06:25 +0000
parents 5d0f71ba8648
children 9a670cfd1941
line wrap: on
line diff
--- a/mpegvideo.c	Sun Jun 07 19:30:54 2009 +0000
+++ b/mpegvideo.c	Tue Jun 09 10:06:25 2009 +0000
@@ -554,6 +554,9 @@
         }
     }
     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))