summaryrefslogtreecommitdiff
path: root/libavcodec
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
parentc99307caee01441cfde24f3b7b0db3037b7022dc (diff)
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')
-rw-r--r--libavcodec/mpegvideo.c8
-rw-r--r--libavcodec/mpegvideo.h1
2 files changed, 3 insertions, 6 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) {
diff --git a/libavcodec/mpegvideo.h b/libavcodec/mpegvideo.h
index b6fc1bb96b..2b2bd88262 100644
--- a/libavcodec/mpegvideo.h
+++ b/libavcodec/mpegvideo.h
@@ -795,7 +795,6 @@ void ff_mpeg_draw_horiz_band(MpegEncContext *s, int y, int h);
void ff_mpeg_flush(AVCodecContext *avctx);
void ff_print_debug_info(MpegEncContext *s, Picture *p);
void ff_write_quant_matrix(PutBitContext *pb, uint16_t *matrix);
-void ff_release_unused_pictures(MpegEncContext *s, int remove_current);
int ff_find_unused_picture(MpegEncContext *s, int shared);
void ff_denoise_dct(MpegEncContext *s, int16_t *block);
int ff_update_duplicate_context(MpegEncContext *dst, MpegEncContext *src);