[FFmpeg-devel] vc1test silly fps check
Kostya
kostya.shishkov
Tue Sep 15 18:37:24 CEST 2009
On Tue, Sep 15, 2009 at 06:15:53PM +0200, Reimar D?ffinger wrote:
> On Tue, Sep 15, 2009 at 06:28:55PM +0300, Kostya wrote:
> > On Tue, Sep 15, 2009 at 12:07:16PM +0200, Reimar D?ffinger wrote:
> > > On Tue, Sep 15, 2009 at 12:56:50PM +0300, Kostya wrote:
> > > > On Tue, Sep 15, 2009 at 11:48:50AM +0200, Reimar D?ffinger wrote:
> > > > > Hello,
> > > > > vc1test has this code:
> > > > > fps = get_le32(pb);
> > > > > if(fps == -1)
> > > > > av_set_pts_info(st, 32, 1, 1000);
> > > > > else{
> > > > > av_set_pts_info(st, 24, 1, fps);
> > > > > st->duration = frames;
> > > > > }
> > > > > Seriously? Is it _supposed_ to be possible to set time_base to 1/0?
> > > >
> > > > From SMPTE 421m:
> > > >
> > > > J.2.3 Integer Frame Rate (FRAMERATE)
> > > > FRAMERATE is a 32-bit unsigned word in the bitstream which may signal
> > > > the rounded frame rate (fps) of the encoded
> > > > clip. FRAMERATE should be set to 0xffffffff if it is not known,
> > > > unspecified, or non-constant.
> > > > Note: This value is usually not used by the decoder.
> > >
> > > How does that justify av_set_pts_info(st, 24, 1, 0); that the above code
> > > allows? A time base of 1/0 seconds still makes no sense.
> >
> > They seem not to care, neither do I.
>
> Um. The point is that FFmpeg does. You can't set the time_base to 1/0,
> that has a very high chance of causing divisions by 0 later on, this
> kind of data validation is part a demuxer's job and this one is not
> doing it IMHO.
Ok, done.
More information about the ffmpeg-devel
mailing list