summaryrefslogtreecommitdiff
path: root/libavformat/flacenc_header.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2014-05-26 22:14:14 +0200
committerAnton Khirnov <anton@khirnov.net>2014-06-01 08:32:33 +0200
commite19d48dfce52f1417f7f06143b96fed00cbcdc52 (patch)
tree3d031e577a222bedcb5456aa850938ef0d9bc4fe /libavformat/flacenc_header.c
parent0097cbea695e534fce39958ccd103af2fbf65831 (diff)
flac muxer: support reading updated extradata from side data
Diffstat (limited to 'libavformat/flacenc_header.c')
-rw-r--r--libavformat/flacenc_header.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libavformat/flacenc_header.c b/libavformat/flacenc_header.c
index a6e2b59f54..4f9bb206e5 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;
}