diff options
author | Anton Khirnov <anton@khirnov.net> | 2013-02-14 11:43:20 +0100 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2013-03-02 10:27:03 +0100 |
commit | 668e16a0dd1ff56d4beeff5c658d8a2a08dbfac8 (patch) | |
tree | 3b08d21e230a1720a3601c6c63c8ea4c773d2139 | |
parent | e671d3ad6cd7fe1d02e9b35b889a25d8c059fce9 (diff) | |
download | ffmpeg-668e16a0dd1ff56d4beeff5c658d8a2a08dbfac8.tar.gz |
h264: on reference overflow, reset the reference count to 0, not 1.
Since decode_slice_header() returns before the reference lists are
constructed, there are zero valid references.
CC:libav-stable@libav.org
-rw-r--r-- | libavcodec/h264.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c index d816835cbf..7d24df261e 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -3391,7 +3391,7 @@ static int decode_slice_header(H264Context *h, H264Context *h0) if (h->ref_count[0] > max_refs || h->ref_count[1] > max_refs) { av_log(h->avctx, AV_LOG_ERROR, "reference overflow\n"); - h->ref_count[0] = h->ref_count[1] = 1; + h->ref_count[0] = h->ref_count[1] = 0; return AVERROR_INVALIDDATA; } |