diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-05-20 12:07:12 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-05-20 12:07:17 +0200 |
commit | d61681f9e99e7caf6b39e0e596d198d3b96f3792 (patch) | |
tree | a8dcecc0c0bb56f4c7c1b514b0d6b8b69bd4a4fd /libavcodec/mpegvideo.c | |
parent | c5e11e897a9db005e93acffe1673aa8a25d18095 (diff) | |
parent | 4b79668154f3cf762a71665aea517bdde57b081c (diff) | |
download | ffmpeg-d61681f9e99e7caf6b39e0e596d198d3b96f3792.tar.gz |
Merge remote-tracking branch 'qatar/master'
* qatar/master:
mpegvideo: unref old current_picture before allocating a new one
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/mpegvideo.c')
-rw-r--r-- | libavcodec/mpegvideo.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c index d61d684209..4ac2f1a5c1 100644 --- a/libavcodec/mpegvideo.c +++ b/libavcodec/mpegvideo.c @@ -1517,6 +1517,8 @@ int ff_MPV_frame_start(MpegEncContext *s, AVCodecContext *avctx) } } + ff_mpeg_unref_picture(s, &s->current_picture); + if (!s->encoding) { ff_release_unused_pictures(s, 1); @@ -1564,7 +1566,6 @@ int ff_MPV_frame_start(MpegEncContext *s, AVCodecContext *avctx) // s->current_picture_ptr->quality = s->new_picture_ptr->quality; s->current_picture_ptr->f.key_frame = s->pict_type == AV_PICTURE_TYPE_I; - ff_mpeg_unref_picture(s, &s->current_picture); if ((ret = ff_mpeg_ref_picture(s, &s->current_picture, s->current_picture_ptr)) < 0) return ret; |