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
(cherry picked from commit 668e16a0dd
)
Conflicts:
libavcodec/h264.c
This commit is contained in:

committed by
Reinhard Tartler

parent
efa8603518
commit
b6f5a1ca58
@@ -3046,7 +3046,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->s.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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user