summaryrefslogtreecommitdiffstats
path: root/libavcodec/dvdec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2015-07-25 15:19:41 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2015-07-25 15:27:44 +0200
commit38490e07247e2a73d31ccb3f57b02db65c033ae3 (patch)
tree9a6f552f4da9263ec1af7f5c5454bc6595f446a1 /libavcodec/dvdec.c
parentbbad3811cc86f1b4c81fbf5042b4d0bbfcef9028 (diff)
downloadffmpeg-streaming-38490e07247e2a73d31ccb3f57b02db65c033ae3.zip
ffmpeg-streaming-38490e07247e2a73d31ccb3f57b02db65c033ae3.tar.gz
avcodec/dvdec: only attempt to conceal errors based on STA inconsistencies when error_concealment is set
This allows the user to disable it in the hypothetical case that STA values are wrong Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/dvdec.c')
-rw-r--r--libavcodec/dvdec.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/libavcodec/dvdec.c b/libavcodec/dvdec.c
index 2a241ab..4d080b2 100644
--- a/libavcodec/dvdec.c
+++ b/libavcodec/dvdec.c
@@ -311,12 +311,14 @@ retry:
for (mb_index = 0; mb_index < 5; mb_index++, mb1 += s->sys->bpm, block1 += s->sys->bpm * 64) {
/* skip header */
quant = buf_ptr[3] & 0x0f;
- if ((buf_ptr[3] >> 4) == 0x0E)
- vs_bit_buffer_damaged = 1;
- if (!mb_index) {
- sta = buf_ptr[3] >> 4;
- } else if (sta != (buf_ptr[3] >> 4))
- vs_bit_buffer_damaged = 1;
+ if (avctx->error_concealment) {
+ if ((buf_ptr[3] >> 4) == 0x0E)
+ vs_bit_buffer_damaged = 1;
+ if (!mb_index) {
+ sta = buf_ptr[3] >> 4;
+ } else if (sta != (buf_ptr[3] >> 4))
+ vs_bit_buffer_damaged = 1;
+ }
buf_ptr += 4;
init_put_bits(&pb, mb_bit_buffer, 80);
mb = mb1;
OpenPOWER on IntegriCloud