[FFmpeg-devel] [PATCH] Add default stream flag
Fri Feb 29 02:29:44 CET 2008
On Fri, Feb 29, 2008 at 02:09:45AM +0100, Aurelien Jacobs wrote:
> > > > --- a/libavformat/matroskaenc.c
> > > > +++ b/libavformat/matroskaenc.c
> > > > @@ -549,6 +549,8 @@ static int mkv_write_tracks(AVFormatContext
> > > > *s) else
> > > > put_ebml_string(pb, MATROSKA_ID_TRACKLANGUAGE,
> > > > "und");
> > > >
> > > > + put_ebml_uint(pb,
> > > > MATROSKA_ID_TRACKFLAGDEFAULT, !!(st->disposition &
> > > > AV_DISPOSITION_DEFAULT));
> > >
> > > IMO, don't write this uint if it's not needed:
> > >
> > > if (st->disposition & AV_DISPOSITION_DEFAULT)
> > > put_ebml_uint(pb, MATROSKA_ID_TRACKFLAGDEFAULT, 1);
> > >
> > > Except that, matroska part is OK.
> > I considered this, but
> > - it's written for every track in almost all mkvs out there;
> > - mkvmerge always writes it.
> > So, just to be safe, for the sake of all demuxers whose authors did
> > not the specification... And 4 bytes per stream is not that much.
> > And, surprise, the default value, according to spec, is 1.
> Hum... Well, then it's fine.
Wouldnt it be more optimal to only write it if its != 1 then? ;)
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
it is not once nor twice but times without number that the same ideas make
their appearance in the world. -- Aristotle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: Digital signature
More information about the ffmpeg-devel