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

Michael Niedermayer michaelni at gmx.at
Sat May 23 16:35:55 CEST 2015


On Sat, May 23, 2015 at 03:29:33PM +0200, wm4 wrote:
> 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?

upon closer inspection, yes there is valid data later in the packet,
ill fix the decoder to correctly decode that

consider this patch withdrawn

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Observe your enemies, for they first find out your faults. -- Antisthenes
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20150523/be7bbb66/attachment.asc>


More information about the ffmpeg-devel mailing list