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

wm4 nfxjfg at googlemail.com
Sat May 23 15:29:33 CEST 2015


On Sat, 23 May 2015 15:10:36 +0200
Michael Niedermayer <michaelni at gmx.at> wrote:

> 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;
>      }
>  

This makes no sense to me. If you remove the error message, why not
also remove the AVERROR_INVALIDDATA return? Is the data valid or not?


More information about the ffmpeg-devel mailing list