[FFmpeg-cvslog] avcodec: Change values of codec ids at the end of lists that dont exist outside ffmpeg yet so
michaelni at gmx.at
Wed Nov 2 19:00:26 CET 2011
On Wed, Nov 02, 2011 at 05:23:03PM +0100, Michael Niedermayer wrote:
> On Wed, Nov 02, 2011 at 04:27:40PM +0100, Nicolas George wrote:
> > Le septidi 7 brumaire, an CCXX, Michael Niedermayer a écrit :
> > > + CODEC_ID_G2M = MKBETAG( 0 ,'G','2','M'),
> > > + CODEC_ID_8SVX_RAW = MKBETAG('8','S','V','X'),
> > > + CODEC_ID_MICRODVD = MKBETAG('m','D','V','D'),
> > > + CODEC_ID_BINTEXT = MKBETAG('B','T','X','T'),
> > > + CODEC_ID_XBIN = MKBETAG('X','B','I','N'),
> > > + CODEC_ID_IDF = MKBETAG( 0 ,'I','D','F'),
> > Using tags like that is a good idea; unfortunately, it will make
> > avcodec_get_type fail, because it does not obey the rule it states:
> > - video codecs from 1 to 0xffff,
> > - audio codecs from 0x10000 to 0x16fff,
> > - subtitles codecs from 0x17000 to 0x17fff.
> the only use of avcodec_get_type() is mkv_query_codec() which is buggy
> per design because unknown codecs most likely come with fourcc in
> codec_tag and have no codec_id entry at all in the enum. Thus theres
> nothing to use as argument in the query.
> for the limited set where this API can work, maybe the patch below is
> enough ?
> but we could also reserve the first letter to specify the type
> what do you think ?
ill commit my patch in a moment (with the typo fixed)
as it fixes a bug and a different solution can always be substituted
its better not to leave it buggy
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
While the State exists there can be no freedom; when there is freedom there
will be no State. -- Vladimir Lenin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 198 bytes
Desc: Digital signature
More information about the ffmpeg-cvslog