[FFmpeg-cvslog] avcodec/error_resilience: check that er is supported before attempting to read the status of the previous slice
Michael Niedermayer
git at videolan.org
Thu Jan 16 02:46:55 CET 2014
ffmpeg | branch: release/1.2 | Michael Niedermayer <michaelni at gmx.at> | Fri Dec 6 16:49:35 2013 +0100| [b841869477c951840f3304f57470baee6e13e474] | committer: Michael Niedermayer
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 at gmx.at>
(cherry picked from commit 90539cea336fd513c47295a03c164cb4a851166f)
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b841869477c951840f3304f57470baee6e13e474
---
libavcodec/error_resilience.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/error_resilience.c b/libavcodec/error_resilience.c
index de84d84..6d18aa8 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;
More information about the ffmpeg-cvslog
mailing list