[FFmpeg-cvslog] flac muxer: fix writing of file header and STREAMINFO header from extradata

Justin Ruggles git at videolan.org
Sun Dec 11 01:12:49 CET 2011


ffmpeg | branch: master | Justin Ruggles <justin.ruggles at gmail.com> | Fri Dec  9 22:51:30 2011 -0500| [28101f6c4eb341fca0c3f7e237f8236b0fde9530] | committer: Justin Ruggles

flac muxer: fix writing of file header and STREAMINFO header from extradata

fixes Bug 119

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=28101f6c4eb341fca0c3f7e237f8236b0fde9530
---

 libavformat/flacenc_header.c |   10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/libavformat/flacenc_header.c b/libavformat/flacenc_header.c
index ad8d55b..c1f7c86 100644
--- a/libavformat/flacenc_header.c
+++ b/libavformat/flacenc_header.c
@@ -37,13 +37,11 @@ int ff_flac_write_header(AVIOContext *pb, AVCodecContext *codec,
     if (!avpriv_flac_is_extradata_valid(codec, &format, &streaminfo))
         return -1;
 
-    /* write "fLaC" stream marker and first metadata block header if needed */
-    if (format == FLAC_EXTRADATA_FORMAT_STREAMINFO) {
-        avio_write(pb, header, 8);
-    }
+    /* write "fLaC" stream marker and first metadata block header */
+    avio_write(pb, header, 8);
 
-    /* write STREAMINFO or full header */
-    avio_write(pb, codec->extradata, codec->extradata_size);
+    /* write STREAMINFO */
+    avio_write(pb, streaminfo, FLAC_STREAMINFO_SIZE);
 
     return 0;
 }



More information about the ffmpeg-cvslog mailing list