[FFmpeg-devel] [PATCH] raw_read_header fix

Alex Beregszaszi alex
Sat Jul 14 11:59:18 CEST 2007


Hi,

> > pcm.diff adds checks into pcm.c to bail out when no sampling rate or
> > channels are set, as itself cannot fill those fields out.
> 
> but decoding of pcm as well as alaw/ulaw should work fine without a sample
> rate, so its wrong to fail ...

Why is it wrong? What can you do with it without knowing the settings?

> [...]
> 
> > Index: libavutil/rational.c
> > ===================================================================
> > --- libavutil/rational.c	(revision 9618)
> > +++ libavutil/rational.c	(working copy)
> > @@ -101,3 +101,7 @@
> >  
> >      return a;
> >  }
> > +
> > +int av_valid_q(AVRational a){
> > +    return a.num >= 0 && a.den > 0;
> > +}
> 
> nonsense, theres nothing invalid on an AVRational if these are false

Okay than av_rescale_q/rnd must be fixed to avoid crash with den=0.

I get division by zero exception running the seektests when it
encounters ulaw/alaw.

--
Alex






More information about the ffmpeg-devel mailing list