diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-06-10 20:50:36 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-06-10 20:50:36 +0200 |
commit | d784d6b7ed254dd61e4802da7d0c0c2b4894daab (patch) | |
tree | 074de940d6dcdaa39fe9529b8bcb760f598ed2fb | |
parent | 88679aeb08b9b29613d283eb5ad29abbabd5a9e9 (diff) | |
parent | c6aa0554b0c3e31fec4580b68ea85b66966cd381 (diff) | |
download | ffmpeg-d784d6b7ed254dd61e4802da7d0c0c2b4894daab.tar.gz |
Merge commit 'c6aa0554b0c3e31fec4580b68ea85b66966cd381'
* commit 'c6aa0554b0c3e31fec4580b68ea85b66966cd381':
mpegvideo: Drop release_unused_pictures() function
Conflicts:
libavcodec/mpegvideo.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/mpegvideo.c | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c index d3ff9d7ec4..b653d47530 100644 --- a/libavcodec/mpegvideo.c +++ b/libavcodec/mpegvideo.c @@ -1140,16 +1140,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]); - } -} static void gray_frame(AVFrame *frame) { @@ -1204,7 +1194,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 |