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

Michael Niedermayer michaelni at gmx.at
Thu Nov 3 01:27:39 CET 2011


On Wed, Nov 02, 2011 at 09:37:55PM +0100, Stefano Sabatini wrote:
> 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.

ill think about writing a more generic solution, if i loose interrest
ill commit this 

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Rewriting code that is poorly written but fully understood is good.
Rewriting code that one doesnt understand is a sign that one is less smart
then the original author, trying to rewrite it will not make it better.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20111103/c451ef7a/attachment.asc>


More information about the ffmpeg-devel mailing list