Hi,

On Sat, Oct 6, 2012 at 9:58 AM, Anton Khirnov <an...@khirnov.net> wrote:
> ---
>  avprobe.c         |    6 +++---
>  cmdutils.c        |   16 +++++++++++-----
>  tools/graph2dot.c |    4 ++--
>  3 files changed, 16 insertions(+), 10 deletions(-)
>
> diff --git a/avprobe.c b/avprobe.c
> index 16a5d29..3a3ae0f 100644
> --- a/avprobe.c
> +++ b/avprobe.c
> @@ -584,6 +584,7 @@ static void show_stream(AVFormatContext *fmt_ctx, int 
> stream_idx)
>      const char *profile;
>      char val_str[128];
>      AVRational display_aspect_ratio;
> +    const AVPixFmtDescriptor *desc;
>
>      probe_object_header("stream");
>
> @@ -629,9 +630,8 @@ static void show_stream(AVFormatContext *fmt_ctx, int 
> stream_idx)
>                            rational_string(val_str, sizeof(val_str), ":",
>                            &display_aspect_ratio));
>              }
> -            probe_str("pix_fmt",
> -                      dec_ctx->pix_fmt != AV_PIX_FMT_NONE ?
> -                      av_pix_fmt_descriptors[dec_ctx->pix_fmt].name : 
> "unknown");
> +            desc = av_pix_fmt_desc_get(dec_ctx->pix_fmt);

I think this is an awful idea, it should be OK to access the array directly.

Ronald
_______________________________________________
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to