From 6136b989f658fff68e2b758db583f04358d3d412 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sun, 20 Jan 2013 17:14:25 +0100 Subject: [PATCH] vc1dec: add assert to impossible *_valid combination. This also fixes a warning about uninitialized variables Signed-off-by: Michael Niedermayer --- libavcodec/vc1dec.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c index 7be1c8cbab..fda4c7399d 100644 --- a/libavcodec/vc1dec.c +++ b/libavcodec/vc1dec.c @@ -1755,9 +1755,10 @@ static inline void vc1_pred_mv_intfr(VC1Context *v, int n, int dmv_x, int dmv_y, px = mid_pred(A[0], B[0], C[0]); py = mid_pred(A[1], B[1], C[1]); } else if (total_valid) { - if (a_valid) { px = A[0]; py = A[1]; } - if (b_valid) { px = B[0]; py = B[1]; } - if (c_valid) { px = C[0]; py = C[1]; } + if (a_valid) { px = A[0]; py = A[1]; } + else if (b_valid) { px = B[0]; py = B[1]; } + else if (c_valid) { px = C[0]; py = C[1]; } + else av_assert2(0); } else px = py = 0; }