diff options
author | Anton Khirnov <anton@khirnov.net> | 2013-02-14 11:44:33 +0100 |
---|---|---|
committer | Reinhard Tartler <siretart@tauware.de> | 2013-03-02 11:20:59 +0100 |
commit | 704952fee52f4033018919fee7815ee3bc833280 (patch) | |
tree | bad6d7e73c6b437e465a45f6d46075fa797efe6d | |
parent | b6f5a1ca588c2d632184f6f8151b4f6100309db4 (diff) | |
download | ffmpeg-704952fee52f4033018919fee7815ee3bc833280.tar.gz |
h264: set ref_count to 0 for intra slices.
CC:libav-stable@libav.org
(cherry picked from commit 437211ae73ef1ed8285b4fed7620502ea4999e11)
Fixes deadlocks waiting for non-existing references with some fuzzed files.
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
-rw-r--r-- | libavcodec/h264.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c index 6f49dd28f2..54f618653d 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -3039,8 +3039,11 @@ static int decode_slice_header(H264Context *h, H264Context *h0) h->list_count = 2; else h->list_count = 1; - } else + } else { h->list_count = 0; + h->ref_count[0] = h->ref_count[1] = 0; + } + max_refs = s->picture_structure == PICT_FRAME ? 16 : 32; |