aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVittorio Giovara <vittorio.giovara@gmail.com>2015-06-08 13:00:50 +0100
committerVittorio Giovara <vittorio.giovara@gmail.com>2015-06-10 14:05:53 +0100
commitc6aa0554b0c3e31fec4580b68ea85b66966cd381 (patch)
treed84b105aeecd42574ce196a7289c9b915ebae6b7
parent7061bf0925a7d6c5899bbe710b2b8cdae9005274 (diff)
downloadffmpeg-c6aa0554b0c3e31fec4580b68ea85b66966cd381.tar.gz
mpegvideo: Drop release_unused_pictures() function
It is only used in one place, and it is small enough that it might be called directly.
-rw-r--r--libavcodec/mpegvideo.c17
1 files changed, 5 insertions, 12 deletions
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
index 86eab07c70..1ea2b6530f 100644
--- a/libavcodec/mpegvideo.c
+++ b/libavcodec/mpegvideo.c
@@ -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