summaryrefslogtreecommitdiff
path: root/libavcodec/mpegvideo.c
diff options
context:
space:
mode:
authorLuca Abeni <lucabe72@email.it>2009-06-09 10:06:25 +0000
committerLuca Abeni <lucabe72@email.it>2009-06-09 10:06:25 +0000
commit747069e2545bcead9303fbf7fadf60c947a7b965 (patch)
treee8f0787b283f406b72e1bd1fe76d88c0f20c96d0 /libavcodec/mpegvideo.c
parent9d58d4717aa541effa8b04cf80e86ae0d8d77484 (diff)
Properly initialize AVFrames to default values in the MPEG decoder (fixes
the AVFrame pts when decoding MPEG 1 and 2 video) Originally committed as revision 19136 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/mpegvideo.c')
-rw-r--r--libavcodec/mpegvideo.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
index 7af9507fce..35cde71f6f 100644
--- a/libavcodec/mpegvideo.c
+++ b/libavcodec/mpegvideo.c
@@ -554,6 +554,9 @@ av_cold int MPV_common_init(MpegEncContext *s)
}
}
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))