h264: set ref_count to 0 for intra slices.

CC:libav-stable@libav.org
(cherry picked from commit 437211ae73)

Fixes deadlocks waiting for non-existing references with some fuzzed files.

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
This commit is contained in:
Anton Khirnov
2013-02-14 11:44:33 +01:00
committed by Reinhard Tartler
parent b6f5a1ca58
commit 704952fee5

View File

@@ -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;