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: ...@@ -311,12 +311,14 @@ retry:
for (mb_index = 0; mb_index < 5; mb_index++, mb1 += s->sys->bpm, block1 += s->sys->bpm * 64) { for (mb_index = 0; mb_index < 5; mb_index++, mb1 += s->sys->bpm, block1 += s->sys->bpm * 64) {
/* skip header */ /* skip header */
quant = buf_ptr[3] & 0x0f; quant = buf_ptr[3] & 0x0f;
if ((buf_ptr[3] >> 4) == 0x0E) if (avctx->error_concealment) {
vs_bit_buffer_damaged = 1; if ((buf_ptr[3] >> 4) == 0x0E)
if (!mb_index) { vs_bit_buffer_damaged = 1;
sta = buf_ptr[3] >> 4; if (!mb_index) {
} else if (sta != (buf_ptr[3] >> 4)) sta = buf_ptr[3] >> 4;
vs_bit_buffer_damaged = 1; } else if (sta != (buf_ptr[3] >> 4))
vs_bit_buffer_damaged = 1;
}
buf_ptr += 4; buf_ptr += 4;
init_put_bits(&pb, mb_bit_buffer, 80); init_put_bits(&pb, mb_bit_buffer, 80);
mb = mb1; 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