[Ffmpeg-cvslog] r7138 - trunk/libavformat/matroska.c

Aurelien Jacobs aurel
Sat Dec 16 19:43:45 CET 2006


On Sat, 16 Dec 2006 17:18:20 +0100
Reimar D?ffinger <Reimar.Doeffinger at stud.uni-karlsruhe.de> wrote:

> Hello,
> On Mon, Nov 20, 2006 at 09:16:32PM +0100, aurel wrote:
> > Author: aurel
> > Date: Mon Nov 20 21:16:32 2006
> > New Revision: 7138
> > 
> > Modified:
> >    trunk/libavformat/matroska.c
> > 
> > Log:
> > add support for tta in matroska
> > 
> > Modified: trunk/libavformat/matroska.c
> > ==============================================================================
> > --- trunk/libavformat/matroska.c	(original)
> > +++ trunk/libavformat/matroska.c	Mon Nov 20 21:16:32 2006
> > @@ -225,6 +225,7 @@
> >      {"A_VORBIS"         , CODEC_ID_VORBIS},
> >      {"A_AAC"            , CODEC_ID_AAC},
> >      {"A_WAVPACK4"       , CODEC_ID_WAVPACK},
> > +    {"A_TTA1"           , CODEC_ID_TTA},
> >      {NULL               , CODEC_ID_NONE}
> >  /* TODO: AC3-9/10 (?), Real, Musepack, Quicktime */
> >  };
> > @@ -2264,6 +2265,23 @@
> >                  }
> >              }
> >  
> > +            else if (codec_id == CODEC_ID_TTA) {
> > +                MatroskaAudioTrack *audiotrack = (MatroskaAudioTrack *) track;
> > +                ByteIOContext b;
> > +                extradata_size = 30;
> > +                extradata = av_mallocz(extradata_size);
> > +                if (extradata == NULL)
> > +                    return AVERROR_NOMEM;
> > +                init_put_byte(&b, extradata, extradata_size, 1,
> > +                              NULL, NULL, NULL, NULL);
> > +                put_buffer(&b, (uint8_t *) "TTA1", 4);
> > +                put_le16(&b, 1);
> > +                put_le16(&b, audiotrack->channels);
> > +                put_le16(&b, audiotrack->bitdepth);
> > +                put_le32(&b, audiotrack->samplerate);
> > +                put_le32(&b, matroska->ctx->duration * audiotrack->samplerate);
> > +            }
> > +
> 
> This breaks compilation with --disable-muxers --disable-protocols.

Oh ! Indeed :-(
Thanks to find this out.

Attached is a dirty fix. But I would prefer to simply remove this
ifdef. There is IMO no reason to limit put_* functions to
MUXERS and PROTOCOLS. Anyone disagree ??

Aurel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mkv_fix.diff
Type: text/x-diff
Size: 653 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-cvslog/attachments/20061216/78e5bd31/attachment.diff>



More information about the ffmpeg-cvslog mailing list