From 91e4dc97cc7cda996a1a2c323bcaaf51fd5a9b18 Mon Sep 17 00:00:00 2001 From: Josh Coalson Date: Thu, 14 Jun 2001 18:57:05 +0000 Subject: [PATCH] add support for APPLICATION block --- src/libFLAC/stream_encoder_framing.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/libFLAC/stream_encoder_framing.c b/src/libFLAC/stream_encoder_framing.c index c187245b..e463006a 100644 --- a/src/libFLAC/stream_encoder_framing.c +++ b/src/libFLAC/stream_encoder_framing.c @@ -81,6 +81,20 @@ bool FLAC__add_metadata_block(const FLAC__StreamMetaData *metadata, FLAC__BitBuf if(!FLAC__bitbuffer_write_zeroes(bb, metadata->length * 8)) return false; break; + case FLAC__METADATA_TYPE_APPLICATION: + if(!FLAC__bitbuffer_write_raw_uint32(bb, metadata->data.application.id[0], 8)) + return false; + if(!FLAC__bitbuffer_write_raw_uint32(bb, metadata->data.application.id[1], 8)) + return false; + if(!FLAC__bitbuffer_write_raw_uint32(bb, metadata->data.application.id[2], 8)) + return false; + if(!FLAC__bitbuffer_write_raw_uint32(bb, metadata->data.application.id[3], 8)) + return false; + for(i = 0; i < metadata->length; i++) { + if(!FLAC__bitbuffer_write_raw_uint32(bb, metadata->data.application.data[i], 8)) + return false; + } + break; case FLAC__METADATA_TYPE_SEEKTABLE: for(i = 0; i < metadata->data.seek_table.num_points; i++) { if(!FLAC__bitbuffer_write_raw_uint64(bb, metadata->data.seek_table.points[i].sample_number, FLAC__STREAM_METADATA_SEEKPOINT_SAMPLE_NUMBER_LEN)) -- 2.34.1