[FFmpeg-devel] [PATCH] ffmpeg: allow overriding and amending AVStream->disposition

Michael Niedermayer michaelni at gmx.at
Thu Jan 8 23:23:57 CET 2015


On Thu, Jan 08, 2015 at 11:09:14PM +0100, Nicolas George wrote:
> Le nonidi 19 nivôse, an CCXXIII, Michael Niedermayer a écrit :
> > + { "default"   , ... { .i64 = AV_DISPOSITION_DEFAULT }, ...
> > + { "dub"       , ... { .i64 = AV_DISPOSITION_DUB     }, ...
> > + { "original"  , ... { .i64 = AV_DISPOSITION_ORIGINAL}, ...
> <snip>
> 
> That makes the third copy of this flag↔string table in the code base: it is
> probably time to make it available through the API. Something like:
> 

>     const char *av_disposition_get_name(unsigned disposition);
> 
> Then the option table in this patch can be built on the fly.

that would work for this usecase but the table really should be
part of the AVOptions/AVClass of AVStream
and that would have to be constant and not runtime generated
the other uses could be changed to use that table though possibly

so i suggest to leave this table as is and eventually move it to
some common place in lavf as part of a AVStream AVClass/AVOptions
and then replace all uses by that table

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The real ebay dictionary, page 2
"100% positive feedback" - "All either got their money back or didnt complain"
"Best seller ever, very honest" - "Seller refunded buyer after failed scam"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20150108/62ec7513/attachment.asc>


More information about the ffmpeg-devel mailing list