diff options
author | Justin Ruggles <justin.ruggles@gmail.com> | 2011-12-10 07:51:30 +0400 |
---|---|---|
committer | Justin Ruggles <justin.ruggles@gmail.com> | 2011-12-10 19:19:41 +0400 |
commit | 28101f6c4eb341fca0c3f7e237f8236b0fde9530 (patch) | |
tree | e2267aed63d64e90aeebe8b9bd89b34e5fe70eab /libavformat | |
parent | 2b53e696c864c4ade3c38707f8595e17a998bedc (diff) |
flac muxer: fix writing of file header and STREAMINFO header from extradata
fixes Bug 119
Diffstat (limited to 'libavformat')
-rw-r--r-- | 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 ad8d55b380..c1f7c86554 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; } |