[FFmpeg-devel] [PATCH] Add writing of vorbis comments to flac files
Justin Ruggles
justin.ruggles
Sun Feb 14 21:35:23 CET 2010
Reimar D?ffinger wrote:
> On Sat, Feb 13, 2010 at 08:13:45PM -0500, Justin Ruggles wrote:
>>> +int flac_write_block_comment(ByteIOContext *pb, AVMetadata *m,
>>> + int last_block, int bitexact)
>>> +{
>>> + const char *vendor = bitexact ? "ffmpeg" : LIBAVFORMAT_IDENT;
>>> + unsigned int len;
>>> + uint8_t *p, *p0;
>>> +
>>> + len = ff_vorbiscomment_length(m, vendor);
>>> + p0 = av_malloc(len+4);
>>> + if (!p0)
>>> + return AVERROR(ENOMEM);
>>> + p = p0;
>>> +
>>> + bytestream_put_byte(&p, last_block ? 0x84 : 0x04);
>>> + bytestream_put_be24(&p, len);
>>> + ff_vorbiscomment_write(&p, m, vendor);
>>
>> If the bitexact flag is set, you should pass NULL instead of m so that
>> tags are not written.
>
> I disagree, with bitexact no version-specific flags or similar should be created,
> but tags in general should be created, otherwise we can never regression-test
> that code.
Ok. I guess the regression tests won't have metadata anyway.
-Justin
More information about the ffmpeg-devel
mailing list