Commit d784d6b7 authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit 'c6aa0554'

* commit 'c6aa0554':
  mpegvideo: Drop release_unused_pictures() function

Conflicts:
	libavcodec/mpegvideo.c
Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents 88679aeb c6aa0554
......@@ -1140,16 +1140,6 @@ void ff_mpv_common_end(MpegEncContext *s)
s->linesize = s->uvlinesize = 0;
}
static void release_unused_pictures(AVCodecContext *avctx, Picture *picture)
{
int i;
/* release non reference frames */
for (i = 0; i < MAX_PICTURE_COUNT; i++) {
if (!picture[i].reference)
ff_mpeg_unref_picture(avctx, &picture[i]);
}
}
static void gray_frame(AVFrame *frame)
{
......@@ -1204,7 +1194,11 @@ int ff_mpv_frame_start(MpegEncContext *s, AVCodecContext *avctx)
ff_mpeg_unref_picture(s->avctx, &s->current_picture);
release_unused_pictures(s->avctx, s->picture);
/* release non reference frames */
for (i = 0; i < MAX_PICTURE_COUNT; i++) {
if (!s->picture[i].reference)
ff_mpeg_unref_picture(s->avctx, &s->picture[i]);
}
if (s->current_picture_ptr && !s->current_picture_ptr->f->buf[0]) {
// we already have a unused image
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment