aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/mpegvideo.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2013-11-30 18:07:06 +0100
committerAnton Khirnov <anton@khirnov.net>2013-12-05 13:26:50 +0100
commit282c6a1a0ef3e8c8e180c15b39cfe5b89704d848 (patch)
tree615e52cacfddf071fa96d1c7bdc2b6d96b669d49 /libavcodec/mpegvideo.c
parentc99307caee01441cfde24f3b7b0db3037b7022dc (diff)
downloadffmpeg-282c6a1a0ef3e8c8e180c15b39cfe5b89704d848.tar.gz
mpegvideo: make ff_release_unused_pictures() static
It is only called from one place in mpegvideo.c now. Also remove the remove_current parameter, which is always 1.
Diffstat (limited to 'libavcodec/mpegvideo.c')
-rw-r--r--libavcodec/mpegvideo.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
index 5648b82908..4abf2234d7 100644
--- a/libavcodec/mpegvideo.c
+++ b/libavcodec/mpegvideo.c
@@ -1348,16 +1348,14 @@ av_cold void ff_init_vlc_rl(RLTable *rl)
}
}
-void ff_release_unused_pictures(MpegEncContext*s, int remove_current)
+static void release_unused_pictures(MpegEncContext *s)
{
int i;
/* release non reference frames */
for (i = 0; i < MAX_PICTURE_COUNT; i++) {
- if (!s->picture[i].reference &&
- (remove_current || &s->picture[i] != s->current_picture_ptr)) {
+ if (!s->picture[i].reference)
ff_mpeg_unref_picture(s, &s->picture[i]);
- }
}
}
@@ -1460,7 +1458,7 @@ 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);
+ release_unused_pictures(s);
if (s->current_picture_ptr &&
s->current_picture_ptr->f.buf[0] == NULL) {