diff options
author | foo86 <foobaz86@gmail.com> | 2016-05-13 12:48:25 +0300 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2016-05-14 19:59:49 +0200 |
commit | 365b0c13e461a5d92e9e689e8f09301fb3255b93 (patch) | |
tree | 9ee506bbec7e2edab7e958c0fe906b27f396f945 | |
parent | 51a1c1c6ac98d1d0d0a654f066782707af092fed (diff) | |
download | ffmpeg-365b0c13e461a5d92e9e689e8f09301fb3255b93.tar.gz |
avcodec/dca: print error message when no frame is found in packet
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavcodec/dcadec.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libavcodec/dcadec.c b/libavcodec/dcadec.c index 303b0c2bc8..f31b658ddf 100644 --- a/libavcodec/dcadec.c +++ b/libavcodec/dcadec.c @@ -179,8 +179,10 @@ static int dcadec_decode_frame(AVCodecContext *avctx, void *data, for (i = 0, ret = AVERROR_INVALIDDATA; i < input_size - MIN_PACKET_SIZE + 1 && ret < 0; i++) ret = convert_bitstream(input + i, input_size - i, s->buffer, s->buffer_size); - if (ret < 0) + if (ret < 0) { + av_log(avctx, AV_LOG_ERROR, "Not a valid DCA frame\n"); return ret; + } input = s->buffer; input_size = ret; @@ -296,6 +298,9 @@ static int dcadec_decode_frame(AVCodecContext *avctx, void *data, } s->core_residual_valid = !!(s->core.filter_mode & DCA_FILTER_MODE_FIXED); } else { + av_log(avctx, AV_LOG_ERROR, "No valid DCA sub-stream found\n"); + if (s->core_only) + av_log(avctx, AV_LOG_WARNING, "Consider disabling 'core_only' option\n"); return AVERROR_INVALIDDATA; } |