Commit 624b83b3 authored by Michael Niedermayer's avatar Michael Niedermayer Committed by Carl Eugen Hoyos

avcodec/error_resilience: check that er is supported before attempting to read…

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: 's avatarMichael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 90539cea)
parent e8304f4e
...@@ -839,7 +839,7 @@ void ff_er_add_slice(ERContext *s, int startx, int starty, ...@@ -839,7 +839,7 @@ void ff_er_add_slice(ERContext *s, int startx, int starty,
s->error_status_table[start_xy] |= VP_START; s->error_status_table[start_xy] |= VP_START;
if (start_xy > 0 && !(s->avctx->active_thread_type & FF_THREAD_SLICE) && 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]]; int prev_status = s->error_status_table[s->mb_index2xy[start_i - 1]];
prev_status &= ~ VP_START; prev_status &= ~ VP_START;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment