Commit 28101f6c authored by Justin Ruggles's avatar Justin Ruggles

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

fixes Bug 119
parent 2b53e696
...@@ -37,13 +37,11 @@ int ff_flac_write_header(AVIOContext *pb, AVCodecContext *codec, ...@@ -37,13 +37,11 @@ int ff_flac_write_header(AVIOContext *pb, AVCodecContext *codec,
if (!avpriv_flac_is_extradata_valid(codec, &format, &streaminfo)) if (!avpriv_flac_is_extradata_valid(codec, &format, &streaminfo))
return -1; return -1;
/* write "fLaC" stream marker and first metadata block header if needed */ /* write "fLaC" stream marker and first metadata block header */
if (format == FLAC_EXTRADATA_FORMAT_STREAMINFO) {
avio_write(pb, header, 8); avio_write(pb, header, 8);
}
/* write STREAMINFO or full header */ /* write STREAMINFO */
avio_write(pb, codec->extradata, codec->extradata_size); avio_write(pb, streaminfo, FLAC_STREAMINFO_SIZE);
return 0; return 0;
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment