aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-12-06 16:49:35 +0100
committerCarl Eugen Hoyos <cehoyos@ag.or.at>2013-12-07 11:44:18 +0100
commit624b83b3efa463eda3f3aa9c9be4792e67b0ab5f (patch)
tree0cd6837b6d73b9512e4c2c617716bc4da82b66ba
parente8304f4ee0b1e291ab9a713dfc69da1d13c1b712 (diff)
downloadffmpeg-624b83b3efa463eda3f3aa9c9be4792e67b0ab5f.tar.gz
avcodec/error_resilience: check that er is supported before attempting to read the status of the previous slice
Fixes incorrectly set error_occured and improves speed Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit 90539cea336fd513c47295a03c164cb4a851166f)
-rw-r--r--libavcodec/error_resilience.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/error_resilience.c b/libavcodec/error_resilience.c
index 40d8b0a191..70fbaf72dd 100644
--- a/libavcodec/error_resilience.c
+++ b/libavcodec/error_resilience.c
@@ -839,7 +839,7 @@ void ff_er_add_slice(ERContext *s, int startx, int starty,
s->error_status_table[start_xy] |= VP_START;
if (start_xy > 0 && !(s->avctx->active_thread_type & FF_THREAD_SLICE) &&
- s->avctx->skip_top * s->mb_width < start_i) {
+ er_supported(s) && s->avctx->skip_top * s->mb_width < start_i) {
int prev_status = s->error_status_table[s->mb_index2xy[start_i - 1]];
prev_status &= ~ VP_START;