1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

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.
This commit is contained in:
Anton Khirnov 2013-11-30 18:07:06 +01:00
parent c99307caee
commit 282c6a1a0e
2 changed files with 3 additions and 6 deletions

View File

@ -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) {

View File

@ -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);