vorbiscomment: convert metadata before computing the header's length

Originally committed as revision 25586 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Anton Khirnov
2010-10-27 05:02:29 +00:00
parent 47bfe49c64
commit 042ca05f0f
3 changed files with 4 additions and 1 deletions

View File

@@ -213,6 +213,8 @@ static uint8_t *ogg_write_vorbiscomment(int offset, int bitexact,
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;
p = av_mallocz(size);
if (!p)