[FFmpeg-devel] [PATCH] Fix metadata bug in ASF muxer
Reimar Döffinger
Reimar.Doeffinger
Thu May 14 10:24:19 CEST 2009
On Wed, May 13, 2009 at 03:19:45PM +0300, Sergei Gurjev wrote:
> This little patch fixes metadata size in asf stream
> diff --git a/libavformat/asfenc.c b/libavformat/asfenc.c
> index 39b4842..f4a6a92 100644
> --- a/libavformat/asfenc.c
> +++ b/libavformat/asfenc.c
> @@ -352,13 +352,13 @@ 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) + 3) + 1);
> + put_le16(pb, 2*(strlen(tag->key) + 3 + 1));
3 + strlen(tag->key) + 1
would be more readable IMO.
> put_le16(pb, 'W');
> put_le16(pb, 'M');
> put_le16(pb, '/');
> put_str16_nolen(pb, tag->key);
> put_le16(pb, 0);
Can someone add a comment what this extra 0 is there for?
Seems strange to have it in-between key and value but not
between different key-value pairs.
More information about the ffmpeg-devel
mailing list