diff options
author | foo86 <foobaz86@gmail.com> | 2016-05-02 23:44:47 +0300 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2016-05-02 23:26:44 +0200 |
commit | ce2f9fdb0a92956aedfa2c564d1374a2f1eebfbd (patch) | |
tree | 6ff3c993c699b374bcf061dff4ec7bc136702b20 /libavcodec/dca_core.c | |
parent | 9fcb59c9bc5cce101e700a8e65bb51a8e2e05451 (diff) |
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>
Diffstat (limited to 'libavcodec/dca_core.c')
-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 fc4fdf4386..58c78f7c76 100644 --- a/libavcodec/dca_core.c +++ b/libavcodec/dca_core.c @@ -1844,9 +1844,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; @@ -1866,9 +1867,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; @@ -1891,9 +1893,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; } |