diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-01-20 17:14:25 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-01-20 17:14:25 +0100 |
commit | 6136b989f658fff68e2b758db583f04358d3d412 (patch) | |
tree | b6e310d3a9e7a5e166866ed6a3dc4836a6313b49 /libavcodec/vc1dec.c | |
parent | cc4a41727e29a52a181e3d1c1a398f1da40969c3 (diff) | |
download | ffmpeg-streaming-6136b989f658fff68e2b758db583f04358d3d412.zip ffmpeg-streaming-6136b989f658fff68e2b758db583f04358d3d412.tar.gz |
vc1dec: add assert to impossible *_valid combination.
This also fixes a warning about uninitialized variables
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/vc1dec.c')
-rw-r--r-- | libavcodec/vc1dec.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c index 7be1c8c..fda4c73 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; } |