1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-21 10:55:51 +02:00

mpegvideo: Drop release_unused_pictures() function

It is only used in one place, and it is small enough that it might be
called directly.
This commit is contained in:
Vittorio Giovara 2015-06-08 13:00:50 +01:00
parent 7061bf0925
commit c6aa0554b0

View File

@ -1109,17 +1109,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]);
}
}
/**
* generic function called after decoding
* the header and before a frame is decoded.
@ -1152,7 +1141,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