Commit 38490e07 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/dvdec: only attempt to conceal errors based on STA inconsistencies...

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: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent bbad3811
......@@ -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;
......
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