[MPlayer-dev-eng] [PATCH] lavf demuxer: always overwrite codec_tag for PCM formats
Michael Niedermayer
michaelni at gmx.at
Mon Jan 14 18:52:47 CET 2008
On Sun, Jan 13, 2008 at 07:03:21PM +0100, Reimar Döffinger wrote:
> Hello,
> On Sun, Jan 13, 2008 at 06:40:21PM +0100, Roberto Togni wrote:
> > Index: demux_lavf.c
> > ===================================================================
> > --- demux_lavf.c (revision 25730)
> > +++ demux_lavf.c (working copy)
> > @@ -92,9 +92,6 @@
> > { CODEC_ID_MUSEPACK7, MKTAG('M', 'P', 'C', ' ')},
> > { CODEC_ID_MUSEPACK8, MKTAG('M', 'P', 'C', '8')},
> > { CODEC_ID_NELLYMOSER, MKTAG('N', 'E', 'L', 'L')},
> > - { CODEC_ID_PCM_S24BE, MKTAG('i', 'n', '2', '4')},
> > - { CODEC_ID_PCM_S16BE, MKTAG('t', 'w', 'o', 's')},
> > - { CODEC_ID_PCM_S8, MKTAG('t', 'w', 'o', 's')},
> > { CODEC_ID_ROQ_DPCM, MKTAG('R', 'o', 'Q', 'A')},
> > { CODEC_ID_SHORTEN, MKTAG('s', 'h', 'r', 'n')},
> > { CODEC_ID_TTA, MKTAG('T', 'T', 'A', '1')},
> > @@ -128,6 +125,17 @@
> >
> > const struct AVCodecTag *mp_bmp_taglists[] = {codec_bmp_tags, mp_bmp_tags, 0};
> >
> > +static const AVCodecTag mp_pcm_tags[] = {
> > + { CODEC_ID_PCM_S8, MKTAG('t', 'w', 'o', 's')},
> > + { CODEC_ID_PCM_U8, 0},
> > + { CODEC_ID_PCM_S16BE, MKTAG('t', 'w', 'o', 's')},
> > + { CODEC_ID_PCM_S16LE, 0},
> > + { CODEC_ID_PCM_S24BE, MKTAG('i', 'n', '2', '4')},
> > + { 0, 0 },
> > +};
> > +
> > +const struct AVCodecTag *mp_pcm_taglists[] = {mp_pcm_tags, 0};
> > +
>
> IMHO it should be before the mp_bmp_tags, not after.
> In addition I'd propose a name more like mp_wav_override_tags or some
> such. Or just always override codec_tag, though that means a bit of a
> loss of information (do some lavc codecs still have checks against
> codec_tag or were they all removed?).
grep codec_tag libavcodec/*.c
:)
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
I have often repented speaking, but never of holding my tongue.
-- Xenocrates
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20080114/a61b5626/attachment.pgp>
More information about the MPlayer-dev-eng
mailing list