From cdc48860a8cbb0080acc0732b2e1c689cea03777 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sat, 2 Feb 2013 16:20:19 +0100 Subject: [PATCH] h264: silence warning about array index being out of bounds The index is not out of bounds, adding an assert makes gcc realize this. Signed-off-by: Michael Niedermayer --- libavcodec/h264.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavcodec/h264.c b/libavcodec/h264.c index 3d759cc4f6..50839bd83c 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -3906,6 +3906,7 @@ static int execute_decode_slices(H264Context *h, int context_count) if (context_count == 1) { return decode_slice(avctx, &h); } else { + av_assert0(context_count > 0); for (i = 1; i < context_count; i++) { hx = h->thread_context[i]; hx->s.err_recognition = avctx->err_recognition;