[FFmpeg-cvslog] r17604 - trunk/libavformat/flacenc.c

jbr subversion
Thu Feb 26 03:32:18 CET 2009


Author: jbr
Date: Thu Feb 26 03:32:18 2009
New Revision: 17604

Log:
Add support for full header extradata to raw FLAC muxer.

Modified:
   trunk/libavformat/flacenc.c

Modified: trunk/libavformat/flacenc.c
==============================================================================
--- trunk/libavformat/flacenc.c	Thu Feb 26 03:30:29 2009	(r17603)
+++ trunk/libavformat/flacenc.c	Thu Feb 26 03:32:18 2009	(r17604)
@@ -29,7 +29,6 @@ static int flac_write_header(struct AVFo
     };
     AVCodecContext *codec = s->streams[0]->codec;
     uint8_t *streaminfo;
-    int len = s->streams[0]->codec->extradata_size;
     enum FLACExtradataFormat format;
 
     if (!ff_flac_is_extradata_valid(codec, &format, &streaminfo))
@@ -37,8 +36,11 @@ static int flac_write_header(struct AVFo
 
     if (format == FLAC_EXTRADATA_FORMAT_STREAMINFO) {
         put_buffer(s->pb, header, 8);
-        put_buffer(s->pb, streaminfo, len);
     }
+
+    /* write STREAMINFO or full header */
+    put_buffer(s->pb, codec->extradata, codec->extradata_size);
+
     return 0;
 }
 




More information about the ffmpeg-cvslog mailing list