diff options
author | Anton Khirnov <anton@khirnov.net> | 2014-11-20 07:40:34 +0100 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2015-01-27 08:34:24 +0100 |
commit | f9f883af4fe615a832407a657752e248a96c6280 (patch) | |
tree | 9f06c3570b0dea69b5dd65f2ba6df93b984e05f2 /libavcodec/h264.c | |
parent | 3a6dfec864d569c2d0a875e1a7466f51b00edb63 (diff) | |
download | ffmpeg-streaming-f9f883af4fe615a832407a657752e248a96c6280.zip ffmpeg-streaming-f9f883af4fe615a832407a657752e248a96c6280.tar.gz |
h264: simplify code in flush_dpb()
There is no point in clearing reference explicitly, since that will be
done as a part of ff_h264_unref_picture() right below.
Diffstat (limited to 'libavcodec/h264.c')
-rw-r--r-- | libavcodec/h264.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c index b902422..684c78f 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -1075,11 +1075,7 @@ static void flush_dpb(AVCodecContext *avctx) H264Context *h = avctx->priv_data; int i; - for (i = 0; i < MAX_DELAYED_PIC_COUNT; i++) { - if (h->delayed_pic[i]) - h->delayed_pic[i]->reference = 0; - h->delayed_pic[i] = NULL; - } + memset(h->delayed_pic, 0, sizeof(h->delayed_pic)); ff_h264_flush_change(h); |