[FFmpeg-devel] [PATCH] asf fix

Marc Mason mpeg.blue
Tue Mar 31 11:49:17 CEST 2009


David DeHaven wrote:

> asfdec.c:get_tag() was cropping the first three chars on non "WM/" 
> prefixed tags.
> 
> Any interest in a -dumpmetadata option? I find it very useful for 
> debugging...
> 
> Index: libavformat/asfdec.c
> ===================================================================
> --- libavformat/asfdec.c    (revision 18202)
> +++ libavformat/asfdec.c    (working copy)
> @@ -158,7 +158,7 @@
>          url_fskip(s->pb, len);
>          return;
>      }
> -    if (strncmp(key, "WM/", 3))
> +    if (!strncmp(key, "WM/", 3))
>          key += 3;
>      av_metadata_set(&s->metadata, key, value);
>  }

Another fine example of the programming errors caused by the 
counter-intuitive mess that is strcmp.

-- 
Regards.




More information about the ffmpeg-devel mailing list