mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-12 10:00:08 +01:00
vorbiscomment: simplify API by using av_dict_count()
This commit is contained in:
@@ -273,18 +273,17 @@ static uint8_t *ogg_write_vorbiscomment(int offset, int bitexact,
|
||||
const char *vendor = bitexact ? "Libav" : LIBAVFORMAT_IDENT;
|
||||
int size;
|
||||
uint8_t *p, *p0;
|
||||
unsigned int count;
|
||||
|
||||
ff_metadata_conv(m, ff_vorbiscomment_metadata_conv, NULL);
|
||||
|
||||
size = offset + ff_vorbiscomment_length(*m, vendor, &count) + framing_bit;
|
||||
size = offset + ff_vorbiscomment_length(*m, vendor) + framing_bit;
|
||||
p = av_mallocz(size);
|
||||
if (!p)
|
||||
return NULL;
|
||||
p0 = p;
|
||||
|
||||
p += offset;
|
||||
ff_vorbiscomment_write(&p, m, vendor, count);
|
||||
ff_vorbiscomment_write(&p, m, vendor);
|
||||
if (framing_bit)
|
||||
bytestream_put_byte(&p, 1);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user