|
|
@@ -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 */ |
|
|
|
|
|
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; |
|
|
return 0; |
|
|
} |
|
|
} |