aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/h264.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-01-18 22:47:49 +0100
committerMichael Niedermayer <michaelni@gmx.at>2014-01-18 22:51:59 +0100
commit87e46dd5fb8bdfdee0ed7645ac992ce958431ed2 (patch)
treeb4b47600df126555ea1edb63bd39ce059a20c840 /libavcodec/h264.c
parent59fb3c4be8265bde09fade8af22527b9033acf46 (diff)
parent0652e024c680420d298cdf3719d0a0c030173fe3 (diff)
downloadffmpeg-87e46dd5fb8bdfdee0ed7645ac992ce958431ed2.tar.gz
Merge commit '0652e024c680420d298cdf3719d0a0c030173fe3'
* commit '0652e024c680420d298cdf3719d0a0c030173fe3': h264: reset ref count if decoding the slice header fails Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/h264.c')
-rw-r--r--libavcodec/h264.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 5699051fef..cde7af98a7 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -5056,9 +5056,10 @@ again:
context_count = 0;
}
- if (err < 0)
+ if (err < 0) {
av_log(h->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