diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-12-06 03:46:42 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-12-06 03:46:47 +0100 |
commit | 52b69fa142cb445c191852a9f9d9dcddf80e95e4 (patch) | |
tree | 555a3403cd3bd87a570c7d9484176be223aba4c8 /libavcodec | |
parent | f1db3f5f593138a9704dc3e4e91871e59289c843 (diff) | |
parent | 282c6a1a0ef3e8c8e180c15b39cfe5b89704d848 (diff) | |
download | ffmpeg-streaming-52b69fa142cb445c191852a9f9d9dcddf80e95e4.zip ffmpeg-streaming-52b69fa142cb445c191852a9f9d9dcddf80e95e4.tar.gz |
Merge commit '282c6a1a0ef3e8c8e180c15b39cfe5b89704d848'
* commit '282c6a1a0ef3e8c8e180c15b39cfe5b89704d848':
mpegvideo: make ff_release_unused_pictures() static
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/mpegvideo.c | 8 | ||||
-rw-r--r-- | libavcodec/mpegvideo.h | 1 |
2 files changed, 3 insertions, 6 deletions
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c index 22cb56a..7380af0 100644 --- a/libavcodec/mpegvideo.c +++ b/libavcodec/mpegvideo.c @@ -1359,16 +1359,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]); - } } } @@ -1492,7 +1490,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 857b297..1d2b291 100644 --- a/libavcodec/mpegvideo.h +++ b/libavcodec/mpegvideo.h @@ -824,7 +824,6 @@ void ff_print_debug_info2(AVCodecContext *avctx, Picture *p, AVFrame *pict, uint int ff_mpv_export_qp_table(MpegEncContext *s, AVFrame *f, Picture *p, int qp_type); 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); |