Commit 1fb4b665 authored by jbr's avatar jbr

fix encoding of flac private data

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@13030 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 22f42f0d
......@@ -429,9 +429,12 @@ static int put_flac_codecpriv(AVFormatContext *s, ByteIOContext *pb, AVCodecCont
return -1;
} else if (codec->extradata_size == FLAC_STREAMINFO_SIZE) {
// only the streaminfo packet
put_byte(pb, 0);
put_xiph_size(pb, codec->extradata_size);
av_log(s, AV_LOG_ERROR, "Only one packet\n");
put_buffer(pb, "fLaC", 4);
put_byte(pb, 0x80);
put_be24(pb, FLAC_STREAMINFO_SIZE);
} else if(memcmp("fLaC", codec->extradata, 4)) {
av_log(s, AV_LOG_ERROR, "Invalid FLAC extradata\n");
return -1;
}
put_buffer(pb, codec->extradata, codec->extradata_size);
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