aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-03-28 03:53:08 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-03-28 04:01:34 +0100
commite234daa5180fabb4e5ba1b713e722a1e12732bc5 (patch)
tree0a7701759b31cd64c50a191d77797034a2e3a1e9
parent10ece44d0948b44b062d09319052d09d14f7bfdb (diff)
downloadffmpeg-e234daa5180fabb4e5ba1b713e722a1e12732bc5.tar.gz
mlpdec: Fix reading state with 0 bit elements.
This fixes an assertion failure Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/mlpdec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/mlpdec.c b/libavcodec/mlpdec.c
index a7c79a413d..a4d53780f1 100644
--- a/libavcodec/mlpdec.c
+++ b/libavcodec/mlpdec.c
@@ -635,7 +635,7 @@ static int read_filter_params(MLPDecodeContext *m, GetBitContext *gbp,
/* TODO: Check validity of state data. */
for (i = 0; i < order; i++)
- fp->state[i] = get_sbits(gbp, state_bits) << state_shift;
+ fp->state[i] = state_bits ? get_sbits(gbp, state_bits) << state_shift : 0;
}
}