summaryrefslogtreecommitdiff
path: root/libavcodec/error_resilience.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2015-01-28 12:38:57 +0100
committerAnton Khirnov <anton@khirnov.net>2015-03-21 11:27:15 +0100
commit5bc69f38c1af71fbcbfb4b5efa77d0aeb5424c04 (patch)
tree5e93c5706cde877d32cb99f22241b4e88a63a1b4 /libavcodec/error_resilience.c
parentc377e04d8aa74d030672e9a4788a700b0695fc14 (diff)
error_resilience: do not require mbintra/skip tables
h264dec does not use them at all and only allocates them for ER.
Diffstat (limited to 'libavcodec/error_resilience.c')
-rw-r--r--libavcodec/error_resilience.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/libavcodec/error_resilience.c b/libavcodec/error_resilience.c
index 0120109448..2c7836f23d 100644
--- a/libavcodec/error_resilience.c
+++ b/libavcodec/error_resilience.c
@@ -934,7 +934,7 @@ void ff_er_frame_end(ERContext *s)
const int mb_xy = s->mb_index2xy[i];
int error = s->error_status_table[mb_xy];
- if (!s->mbskip_table[mb_xy]) // FIXME partition specific
+ if (s->mbskip_table && !s->mbskip_table[mb_xy]) // FIXME partition specific
distance++;
if (error & (1 << error_type))
distance = 0;
@@ -1205,11 +1205,12 @@ ec_clean:
const int mb_xy = s->mb_index2xy[i];
int error = s->error_status_table[mb_xy];
- if (s->cur_pic.f->pict_type != AV_PICTURE_TYPE_B &&
+ if (s->mbskip_table && s->cur_pic.f->pict_type != AV_PICTURE_TYPE_B &&
(error & (ER_DC_ERROR | ER_MV_ERROR | ER_AC_ERROR))) {
s->mbskip_table[mb_xy] = 0;
}
- s->mbintra_table[mb_xy] = 1;
+ if (s->mbintra_table)
+ s->mbintra_table[mb_xy] = 1;
}
memset(&s->cur_pic, 0, sizeof(ERPicture));