Commit 58b2ce79 authored by jbr's avatar jbr

Add support for full header extradata to raw FLAC muxer.

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@17604 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 58cd14b7
...@@ -29,7 +29,6 @@ static int flac_write_header(struct AVFormatContext *s) ...@@ -29,7 +29,6 @@ static int flac_write_header(struct AVFormatContext *s)
}; };
AVCodecContext *codec = s->streams[0]->codec; AVCodecContext *codec = s->streams[0]->codec;
uint8_t *streaminfo; uint8_t *streaminfo;
int len = s->streams[0]->codec->extradata_size;
enum FLACExtradataFormat format; enum FLACExtradataFormat format;
if (!ff_flac_is_extradata_valid(codec, &format, &streaminfo)) if (!ff_flac_is_extradata_valid(codec, &format, &streaminfo))
...@@ -37,8 +36,11 @@ static int flac_write_header(struct AVFormatContext *s) ...@@ -37,8 +36,11 @@ static int flac_write_header(struct AVFormatContext *s)
if (format == FLAC_EXTRADATA_FORMAT_STREAMINFO) { if (format == FLAC_EXTRADATA_FORMAT_STREAMINFO) {
put_buffer(s->pb, header, 8); put_buffer(s->pb, header, 8);
put_buffer(s->pb, streaminfo, len);
} }
/* write STREAMINFO or full header */
put_buffer(s->pb, codec->extradata, codec->extradata_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