[Ffmpeg-devel] [PATCH] xan_dpcm in MPlayer + libavformat

Diego Biurrun diego
Sat Nov 18 02:13:41 CET 2006


On Sat, Nov 18, 2006 at 01:01:20AM +0000, M?ns Rullg?rd wrote:
> Diego Biurrun <diego at biurrun.de> writes:
> 
> > Attached patch is necessary to make xan_dpcm work in MPlayer with the
> > libavformat AVI demuxer.  Since it just adds another line to an already
> > present hack I hope it's acceptable...
> >
> > --- libavformat/avidec.c	(revision 7117)
> > +++ libavformat/avidec.c	(working copy)
> > @@ -451,8 +451,10 @@
> >                          st->need_parsing = 0;
> >                      /* force parsing as several audio frames can be in
> >                         one packet */
> > -                    if (xan_video)
> > +                    if (xan_video){
> >                          st->codec->codec_id = CODEC_ID_XAN_DPCM;
> > +                        st->codec->codec_tag = 0;
> > +                    }
> >                      break;
> >                  default:
> >                      st->codec->codec_type = CODEC_TYPE_DATA;
> 
> The proper fix would of course be for mplayer to use codec_id instead
> of codec_tag to choose decoder.  Well, it's ugly enough as it is, so I
> don't object to adding this to the hack.  That said, I'd be grateful
> to whomever could find the person responsible for this lunacy in the
> first place, and shoot him.

IIUC MPlayer falls back on codec_id if codec_tag is not set.  The
problem is that these AVI files mark the xan_dpcm audio as 0x1 (or was
it FourCC Axan + TwoCC 0x1 Roberto?), which is PCM.  I don't think there
is a way to support this without hacks..

Diego




More information about the ffmpeg-devel mailing list