[FFmpeg-devel] [PATCH] asf - read/write metadata as UTF-16

Anton Khirnov wyskas
Tue Feb 23 08:03:07 CET 2010


On Mon, Feb 22, 2010 at 11:51:37PM +0100, Michael Niedermayer wrote:
> On Mon, Feb 22, 2010 at 11:12:14PM +0100, Anton Khirnov wrote:
> > On Mon, Feb 22, 2010 at 08:18:53PM +0100, Michael Niedermayer wrote:
> > >
> > > > diff --git a/libavformat/asfenc.c b/libavformat/asfenc.c
> > > > index b24baaf..5f584a2 100644
> > > > --- a/libavformat/asfenc.c
> > > > +++ b/libavformat/asfenc.c
> > > > @@ -345,10 +345,7 @@ static int asf_write_header1(AVFormatContext *s, int64_t file_size, int64_t data
> > > >          hpos = put_header(pb, &ff_asf_extended_content_header);
> > > >          put_le16(pb, metadata_count);
> > > >          while ((tag = av_metadata_get(s->metadata, "", tag, AV_METADATA_IGNORE_SUFFIX))) {
> > > > -            put_le16(pb, 2*(strlen(tag->key) + 4));
> > > > -            put_le16(pb, 'W');
> > > > -            put_le16(pb, 'M');
> > > > -            put_le16(pb, '/');
> > > > +            put_le16(pb, 2*(strlen(tag->key) + 1));
> > > 
> > > thats storing a different length than it did before
> > > no doubt the one before was wrong but this doesnt belong in this patch
> > > and the new looks at least suspicous as thats strlen of utf8
> > > 
> > huh? i just removed the 'WM/' prefix => length decreased by 2*3.
> 
> ill skip the math
> first is even second is odd no change to strlen can do this
> 
err no, both are even. sorry, i really don't see where the problem is.

Anton Khirnov
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100223/b956c7b1/attachment.pgp>



More information about the ffmpeg-devel mailing list