diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-06-01 16:16:29 +0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-06-01 16:16:29 +0400 |
commit | 955b31a7513e924cce36e484dc098581290af9b6 (patch) | |
tree | f063480e25161f2038c50e9106c0a9666beebb50 /libavformat/flacenc_header.c | |
parent | 855e3b5700fff78bf20f900daade58396b73846d (diff) | |
parent | e19d48dfce52f1417f7f06143b96fed00cbcdc52 (diff) |
Merge commit 'e19d48dfce52f1417f7f06143b96fed00cbcdc52'
* commit 'e19d48dfce52f1417f7f06143b96fed00cbcdc52':
flac muxer: support reading updated extradata from side data
Conflicts:
libavformat/flacenc.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/flacenc_header.c')
-rw-r--r-- | libavformat/flacenc_header.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libavformat/flacenc_header.c b/libavformat/flacenc_header.c index 3fb28c9e3b..61833cc8b9 100644 --- a/libavformat/flacenc_header.c +++ b/libavformat/flacenc_header.c @@ -26,8 +26,8 @@ #include "avformat.h" #include "flacenc.h" -int ff_flac_write_header(AVIOContext *pb, AVCodecContext *codec, - int last_block) +int ff_flac_write_header(AVIOContext *pb, uint8_t *extradata, + int extradata_size, int last_block) { uint8_t header[8] = { 0x66, 0x4C, 0x61, 0x43, 0x00, 0x00, 0x00, 0x22 @@ -35,14 +35,14 @@ int ff_flac_write_header(AVIOContext *pb, AVCodecContext *codec, header[4] = last_block ? 0x80 : 0x00; - if (codec->extradata_size < FLAC_STREAMINFO_SIZE) + if (extradata_size < FLAC_STREAMINFO_SIZE) return AVERROR_INVALIDDATA; /* write "fLaC" stream marker and first metadata block header */ avio_write(pb, header, 8); /* write STREAMINFO */ - avio_write(pb, codec->extradata, FLAC_STREAMINFO_SIZE); + avio_write(pb, extradata, FLAC_STREAMINFO_SIZE); return 0; } |