[FFmpeg-cvslog] r25586 - in trunk/libavformat: flacenc.c oggenc.c vorbiscomment.c

elenril subversion
Wed Oct 27 07:02:29 CEST 2010


Author: elenril
Date: Wed Oct 27 07:02:29 2010
New Revision: 25586

Log:
vorbiscomment: convert metadata before computing the header's length

Modified:
   trunk/libavformat/flacenc.c
   trunk/libavformat/oggenc.c
   trunk/libavformat/vorbiscomment.c

Modified: trunk/libavformat/flacenc.c
==============================================================================
--- trunk/libavformat/flacenc.c	Wed Oct 27 02:42:35 2010	(r25585)
+++ trunk/libavformat/flacenc.c	Wed Oct 27 07:02:29 2010	(r25586)
@@ -46,6 +46,8 @@ static int flac_write_block_comment(Byte
     unsigned int len, count;
     uint8_t *p, *p0;
 
+    ff_metadata_conv(m, ff_vorbiscomment_metadata_conv, NULL);
+
     len = ff_vorbiscomment_length(*m, vendor, &count);
     p0 = av_malloc(len+4);
     if (!p0)

Modified: trunk/libavformat/oggenc.c
==============================================================================
--- trunk/libavformat/oggenc.c	Wed Oct 27 02:42:35 2010	(r25585)
+++ trunk/libavformat/oggenc.c	Wed Oct 27 07:02:29 2010	(r25586)
@@ -213,6 +213,8 @@ static uint8_t *ogg_write_vorbiscomment(
     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)

Modified: trunk/libavformat/vorbiscomment.c
==============================================================================
--- trunk/libavformat/vorbiscomment.c	Wed Oct 27 02:42:35 2010	(r25585)
+++ trunk/libavformat/vorbiscomment.c	Wed Oct 27 07:02:29 2010	(r25586)
@@ -55,7 +55,6 @@ int ff_vorbiscomment_length(AVMetadata *
 int ff_vorbiscomment_write(uint8_t **p, AVMetadata **m,
                            const char *vendor_string, const unsigned count)
 {
-    ff_metadata_conv(m, ff_vorbiscomment_metadata_conv, NULL);
     bytestream_put_le32(p, strlen(vendor_string));
     bytestream_put_buffer(p, vendor_string, strlen(vendor_string));
     if (*m) {



More information about the ffmpeg-cvslog mailing list