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

Rich Felker dalias
Wed Nov 22 07:29:59 CET 2006


On Wed, Nov 22, 2006 at 01:19:26AM +0100, Michael Niedermayer wrote:
> Hi
> 
> On Wed, Nov 22, 2006 at 12:47:21AM +0100, aurel wrote:
> > Author: aurel
> > Date: Wed Nov 22 00:47:21 2006
> > New Revision: 7150
> > 
> > Modified:
> >    trunk/libavformat/matroska.c
> > 
> > Log:
> > add support for FLAC in matroska
> > 
> > Modified: trunk/libavformat/matroska.c
> > ==============================================================================
> > --- trunk/libavformat/matroska.c	(original)
> > +++ trunk/libavformat/matroska.c	Wed Nov 22 00:47:21 2006
> > @@ -224,6 +224,7 @@
> >      {"A_DTS"            , CODEC_ID_DTS},
> >      {"A_VORBIS"         , CODEC_ID_VORBIS},
> >      {"A_AAC"            , CODEC_ID_AAC},
> > +    {"A_FLAC"           , CODEC_ID_FLAC},
> >      {"A_WAVPACK4"       , CODEC_ID_WAVPACK},
> >      {"A_TTA1"           , CODEC_ID_TTA},
> >      {NULL               , CODEC_ID_NONE}
> > @@ -2265,6 +2266,14 @@
> >                  }
> >              }
> >  
> > +            else if (codec_id == CODEC_ID_FLAC) {
> > +                AVPacket *pkt = av_mallocz(sizeof(AVPacket));
> > +                av_new_packet(pkt, track->codec_priv_size);
> > +                memcpy(pkt->data, track->codec_priv, track->codec_priv_size);
> > +                matroska_queue_packet(matroska, pkt);
> > +                track->codec_priv_size = 0;
> > +            }
> 
> hmm, are you injecting a global header as first packet into the stream?
> if so that is not ok, fix the decoder or fix the global header so the
> decoder parses it correctly

Indeed, this is absolutely not ok. Fix the decoder and revert this
breakage asap.

Rich





More information about the ffmpeg-cvslog mailing list