diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-06-03 01:47:30 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-06-03 01:47:33 +0200 |
commit | 8d32735629321873ed2d4993b1b0a2a037aca29e (patch) | |
tree | 13d2378440abe69d2fc9891cb27df6a39a9ba49c | |
parent | 0558832796b0be1fb8817ba8b7cbfa9d5cf765ee (diff) | |
parent | 35ba079fbf281a066f3ac1e1271f3caa402dcd74 (diff) | |
download | ffmpeg-8d32735629321873ed2d4993b1b0a2a037aca29e.tar.gz |
Merge commit '35ba079fbf281a066f3ac1e1271f3caa402dcd74' into release/0.10
* commit '35ba079fbf281a066f3ac1e1271f3caa402dcd74':
h264: reset ref count if decoding the slice header fails
Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/h264.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c index d15b00ca15..b7a7c49992 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -4133,9 +4133,10 @@ static int decode_nal_units(H264Context *h, const uint8_t *buf, int buf_size){ context_count = 0; } - if (err < 0) + if (err < 0) { av_log(h->s.avctx, AV_LOG_ERROR, "decode_slice_header error\n"); - else if(err == 1) { + h->ref_count[0] = h->ref_count[1] = h->list_count = 0; + } else if (err == 1) { /* Slice could not be decoded in parallel mode, copy down * NAL unit stuff to context 0 and restart. Note that * rbsp_buffer is not transferred, but since we no longer |