[FFmpeg-cvslog] avcodec/dvdec: only attempt to conceal errors based on STA inconsistencies when error_concealment is set
Michael Niedermayer
git at videolan.org
Sat Jul 25 15:28:23 CEST 2015
ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Sat Jul 25 15:19:41 2015 +0200| [38490e07247e2a73d31ccb3f57b02db65c033ae3] | committer: Michael Niedermayer
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 at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=38490e07247e2a73d31ccb3f57b02db65c033ae3
---
libavcodec/dvdec.c | 14 ++++++++------
1 file 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;
More information about the ffmpeg-cvslog
mailing list