Merge commit 'efcde917af407a6031ecff68edd51fce7b83d104'

* commit 'efcde917af407a6031ecff68edd51fce7b83d104':
  vorbiscomment: simplify API by using av_dict_count()

Conflicts:
	libavformat/flacenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer
2014-05-28 13:08:50 +02:00
4 changed files with 10 additions and 16 deletions

View File

@@ -277,18 +277,17 @@ static uint8_t *ogg_write_vorbiscomment(int offset, int bitexact,
const char *vendor = bitexact ? "ffmpeg" : 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);