mirror of https://git.ffmpeg.org/ffmpeg.git
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>
This commit is contained in:
commit
d61681f9e9
|
@ -1517,6 +1517,8 @@ int ff_MPV_frame_start(MpegEncContext *s, AVCodecContext *avctx)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ff_mpeg_unref_picture(s, &s->current_picture);
|
||||||
|
|
||||||
if (!s->encoding) {
|
if (!s->encoding) {
|
||||||
ff_release_unused_pictures(s, 1);
|
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->quality = s->new_picture_ptr->quality;
|
||||||
s->current_picture_ptr->f.key_frame = s->pict_type == AV_PICTURE_TYPE_I;
|
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,
|
if ((ret = ff_mpeg_ref_picture(s, &s->current_picture,
|
||||||
s->current_picture_ptr)) < 0)
|
s->current_picture_ptr)) < 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
Loading…
Reference in New Issue