[FFmpeg-devel] [PATCH] ACT demuxer
Mon Feb 25 00:00:28 CET 2008
On Sun, Feb 24, 2008 at 08:45:00PM +0100, Reimar D?ffinger wrote:
> On Sun, Feb 24, 2008 at 08:14:50PM +0100, Michael Niedermayer wrote:
> > > > and
> > > > av_set_pts_info(st, 64, st->codec->frame_size, st->codec->sample_rate);
> > > [...]
> > > > > + st->duration=(1000*(min*60+sec)+msec)/st->time_base.num;
> > >
> > > This brings up another thing... I do not mind much, but is this better
> > > like this or would it be better to always do
> > > av_set_pts_info(st, 64, 1, 1000);
> > >
> > > and instead set pkt->duration to either 10 or 20?
> > ohhh well ...
> > time for bikeshed wars :)
> > of course it should be
> > av_set_pts_info(st, 64, 1, 100);
> > and
> > av_set_pts_info(st, 64, 1, 50);
> > with duration=1;
> > :)
> Well, the reason is only that the file seems to specify duration in
> millisecond precision for some reason, it could have been that it is for
> some good reason and players would be supposed to maybe not play some of
> the samples from the last packet.
> Ok, ok I know, really unlikely...
AVStream.duration is defined as the true duration of the stream and not
some "croped" subset. There were enough problems due to demuxers setting
start_time to values differing from the first pts that i really dont
like to find out what would happen if duration would be set similarly.
If some demxuer has information available about specific subsets of a stream
like some "play only this" or chapters, scenes, whatever ...
Then this needs a proper API to export it to the user (app),
start_time+duration is insufficient to do this and is a very ugly misuse of
variables which already have a different use and definition.
This is like using AVCodecContext.width/height (=the internal codec w/h) to
export some croped/scaled rectangle.
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
No human being will ever know the Truth, for even if they happen to say it
by chance, they would not even known they had done so. -- Xenophanes
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: Digital signature
More information about the ffmpeg-devel