[FFmpeg-devel] [PATCH] ffprobe: print is_avc for H.264

Stefano Sabatini stefasab at gmail.com
Wed Nov 2 21:37:55 CET 2011


On date Wednesday 2011-11-02 18:58:15 +0100, Michael Niedermayer encoded:
> See attachment
> the h264.c part needed for this will be in git in a moment
> 
> -- 
> Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
> 
> The real ebay dictionary, page 2
> "100% positive feedback" - "All either got their money back or didnt complain"
> "Best seller ever, very honest" - "Seller refunded buyer after failed scam"

> From 2ec0de491875cf5a227a22edd51ee8ff6ef55b2b Mon Sep 17 00:00:00 2001
> From: Michael Niedermayer <michaelni at gmx.at>
> Date: Wed, 2 Nov 2011 18:38:53 +0100
> Subject: [PATCH] ffprobe: print is_avc for H.264
> 
> Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> ---
>  ffprobe.c |    3 +++
>  1 files changed, 3 insertions(+), 0 deletions(-)
> 
> diff --git a/ffprobe.c b/ffprobe.c
> index 470001c..eb28364 100644
> --- a/ffprobe.c
> +++ b/ffprobe.c
> @@ -696,6 +696,9 @@ static void show_stream(WriterContext *w, AVFormatContext *fmt_ctx, int stream_i
>              }
>              print_str("pix_fmt", av_x_if_null(av_get_pix_fmt_name(dec_ctx->pix_fmt), "unknown"));
>              print_int("level",   dec_ctx->level);

> +            if(dec_ctx->codec_id == CODEC_ID_H264 && dec_ctx->codec->priv_class){
> +                print_int("is_avc", av_get_int(dec_ctx->priv_data, "is_avc", NULL));
> +            }

I'm not really fond of exposing private data in this crude way, but
since a more generic implementation may require time and/or result
completely overkill, I assume it is fine if you have a sensible use
case for this.
Extra karma points if you might avoid the if(..){ style weirdness.
-- 
FFmpeg = Frenzy and Fascinating Maxi Puristic Enhanced Gem


More information about the ffmpeg-devel mailing list