aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/flacenc.c
diff options
context:
space:
mode:
authorJustin Ruggles <justin.ruggles@gmail.com>2009-02-26 02:32:18 +0000
committerJustin Ruggles <justin.ruggles@gmail.com>2009-02-26 02:32:18 +0000
commit25582b8929715c537ea8046f5831f36063df6e5d (patch)
tree6b58fb436cde8da837a577949f2c50d2bfdb6e4d /libavformat/flacenc.c
parent26adc8d0860b7f433e7ac45d978572019b0fb18f (diff)
downloadffmpeg-25582b8929715c537ea8046f5831f36063df6e5d.tar.gz
Add support for full header extradata to raw FLAC muxer.
Originally committed as revision 17604 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/flacenc.c')
-rw-r--r--libavformat/flacenc.c6
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;
}