diff options
author | foo86 <foobaz86@gmail.com> | 2016-05-02 23:44:47 +0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2016-05-02 22:48:52 -0300 |
commit | 08c21bcb5dfd609167327a7900be6292fd0e51c1 (patch) | |
tree | 551570c7b2abbd293070b6ab212ae7438ed37d80 | |
parent | e675926a4fa6720925bbe708fadeb19eff3e5dd5 (diff) | |
download | ffmpeg-08c21bcb5dfd609167327a7900be6292fd0e51c1.tar.gz |
avcodec/dca: fix sync word search error condition
This didn't actually check if sync word was found and always errored out
with "-err_detect explode" option enabled.
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit ce2f9fdb0a92956aedfa2c564d1374a2f1eebfbd)
-rw-r--r-- | libavcodec/dca_core.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/libavcodec/dca_core.c b/libavcodec/dca_core.c index d9f1a4ca76..19496e944b 100644 --- a/libavcodec/dca_core.c +++ b/libavcodec/dca_core.c @@ -1900,9 +1900,10 @@ static int parse_optional_info(DCACoreDecoder *s) } } - if (s->avctx->err_recognition & AV_EF_EXPLODE) { + if (!s->xch_pos) { av_log(s->avctx, AV_LOG_ERROR, "XCH sync word not found\n"); - return AVERROR_INVALIDDATA; + if (s->avctx->err_recognition & AV_EF_EXPLODE) + return AVERROR_INVALIDDATA; } break; @@ -1922,9 +1923,10 @@ static int parse_optional_info(DCACoreDecoder *s) } } - if (s->avctx->err_recognition & AV_EF_EXPLODE) { + if (!s->x96_pos) { av_log(s->avctx, AV_LOG_ERROR, "X96 sync word not found\n"); - return AVERROR_INVALIDDATA; + if (s->avctx->err_recognition & AV_EF_EXPLODE) + return AVERROR_INVALIDDATA; } break; @@ -1947,9 +1949,10 @@ static int parse_optional_info(DCACoreDecoder *s) } } - if (s->avctx->err_recognition & AV_EF_EXPLODE) { + if (!s->xxch_pos) { av_log(s->avctx, AV_LOG_ERROR, "XXCH sync word not found\n"); - return AVERROR_INVALIDDATA; + if (s->avctx->err_recognition & AV_EF_EXPLODE) + return AVERROR_INVALIDDATA; } break; } |