[Ffmpeg-devel] Wrong duration in a nut container

Rich Felker dalias
Fri Aug 12 18:16:51 CEST 2005

On Fri, Aug 12, 2005 at 10:31:00AM +0200, Michael Niedermayer wrote:
> > > nuts duration field is in a info packet and thats neither stored nor read
> > > currently, patch welcome
> > 
> > IMO using the info field is a very bad idea. For instance people might
> > framecopy a nut file to make a small excerpt, and keep all the info
> > headers. Then the total length will be wrong. Instead the demuxer
> > should seek to the end and read the last timestamps to find total
> > length.. It will already be seeking to end to read index anyway, and
> > if there's an index it can just get total length from the index.
> and if the file is on something non seekable?
> its a question which is more important, the validity of the duration
> field in randomly cut raw pieces or the availabilty of the duration 
> in non seekable streams

imo duration makes no sense in nonseekable streams. usually they're
continuous and have infinite/unknown/unspecified duration. there's
certainly no reason the player needs to know the duration if it can't


More information about the ffmpeg-devel mailing list