diff options
author | Justin Ruggles <justin.ruggles@gmail.com> | 2009-02-26 05:32:18 +0300 |
---|---|---|
committer | Justin Ruggles <justin.ruggles@gmail.com> | 2009-02-26 05:32:18 +0300 |
commit | 25582b8929715c537ea8046f5831f36063df6e5d (patch) | |
tree | 6b58fb436cde8da837a577949f2c50d2bfdb6e4d | |
parent | 26adc8d0860b7f433e7ac45d978572019b0fb18f (diff) |
Add support for full header extradata to raw FLAC muxer.
Originally committed as revision 17604 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavformat/flacenc.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libavformat/flacenc.c b/libavformat/flacenc.c index 5595d76b7d..23d1be8721 100644 --- a/libavformat/flacenc.c +++ b/libavformat/flacenc.c @@ -29,7 +29,6 @@ static int flac_write_header(struct AVFormatContext *s) }; AVCodecContext *codec = s->streams[0]->codec; uint8_t *streaminfo; - int len = s->streams[0]->codec->extradata_size; enum FLACExtradataFormat format; if (!ff_flac_is_extradata_valid(codec, &format, &streaminfo)) @@ -37,8 +36,11 @@ static int flac_write_header(struct AVFormatContext *s) if (format == FLAC_EXTRADATA_FORMAT_STREAMINFO) { 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; } |