[FFmpeg-devel] vc1test silly fps check

Kostya kostya.shishkov
Tue Sep 15 17:28:55 CEST 2009


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.

> I'd also like to point out that fps == -1 assumes that int is no more
> than 32 bits, since get_le32 returns something unsigned.

Point accepted.



More information about the ffmpeg-devel mailing list