[FFmpeg-devel] [PATCH] avcodec/dcadec: Reduce log level for incomplete first DCA frames

Michael Niedermayer michaelni at gmx.at
Sat May 23 15:10:36 CEST 2015


The first frame is very often not valid, (it appears to be truncated)
the error message thus serves no purpose

Found-by: rcombs
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
---
 libavcodec/dcadec.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/dcadec.c b/libavcodec/dcadec.c
index 91db893..f34e28f 100644
--- a/libavcodec/dcadec.c
+++ b/libavcodec/dcadec.c
@@ -1490,7 +1490,7 @@ static int dca_decode_frame(AVCodecContext *avctx, void *data,
     s->dca_buffer_size = avpriv_dca_convert_bitstream(buf, buf_size, s->dca_buffer,
                                                   DCA_MAX_FRAME_SIZE + DCA_MAX_EXSS_HEADER_SIZE);
     if (s->dca_buffer_size == AVERROR_INVALIDDATA) {
-        av_log(avctx, AV_LOG_ERROR, "Not a valid DCA frame\n");
+        av_log(avctx, avctx->frame_number ? AV_LOG_ERROR : AV_LOG_DEBUG, "Not a valid DCA frame\n");
         return AVERROR_INVALIDDATA;
     }
 
-- 
1.7.9.5



More information about the ffmpeg-devel mailing list