[FFmpeg-devel] [PATCH] align pix_fmt list

Ramiro Polla ramiro.polla
Sun Sep 20 17:30:53 CEST 2009


On Sun, Sep 20, 2009 at 11:52 AM, Justin Ruggles
<justin.ruggles at gmail.com> wrote:
> There are some pixel format names with more than 10 characters, so they
> mess up the list alignment. ?Patch attached.

[...]

> diff --git a/libavcodec/imgconvert.c b/libavcodec/imgconvert.c
> index ecadd63..8e0490a 100644
> --- a/libavcodec/imgconvert.c
> +++ b/libavcodec/imgconvert.c
> @@ -585,7 +585,7 @@ void avcodec_pix_fmt_string (char *buf, int buf_size, enum PixelFormat pix_fmt)
>          char is_alpha_char= info.is_alpha ? 'y' : 'n';
>
>          snprintf (buf, buf_size,
> -                  "%-10s" "      %1d     " "   %2d " "     %c   ",
> +                  "%-11s" "     %1d     " "   %2d " "     %c   ",
>                    info.name,
>                    info.nb_channels,
>                    info.depth,

That's a weird format string. Why isn't it simply "%-16s%-8s%-6s%c" ?
It gets filled up with whitespace anyways.



More information about the ffmpeg-devel mailing list