[FFmpeg-devel] [PATCH] ffprobe: Support extracting the number of reference frames

Michael Niedermayer michaelni at gmx.at
Tue Dec 30 18:10:17 CET 2014


On Tue, Dec 30, 2014 at 10:24:56AM +0100, Stefano Sabatini wrote:
> On date Monday 2014-12-29 12:47:48 +0100, Michael Niedermayer encoded:
> > Fixes Ticket3141
> > 
> > Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> > ---
> >  doc/ffprobe.xsd                |    1 +
> >  ffprobe.c                      |    1 +
> >  tests/ref/fate/ffprobe_compact |    4 ++--
> >  tests/ref/fate/ffprobe_csv     |    4 ++--
> >  tests/ref/fate/ffprobe_default |    2 ++
> >  tests/ref/fate/ffprobe_flat    |    2 ++
> >  tests/ref/fate/ffprobe_ini     |    2 ++
> >  tests/ref/fate/ffprobe_json    |    2 ++
> >  tests/ref/fate/ffprobe_xml     |    4 ++--
> >  9 files changed, 16 insertions(+), 6 deletions(-)
> > 
> > diff --git a/doc/ffprobe.xsd b/doc/ffprobe.xsd
> > index c2cab37..31ca418 100644
> > --- a/doc/ffprobe.xsd
> > +++ b/doc/ffprobe.xsd
> > @@ -182,6 +182,7 @@
> >        <xsd:attribute name="color_primaries"      type="xsd:string"/>
> >        <xsd:attribute name="chroma_location"      type="xsd:string"/>
> >        <xsd:attribute name="timecode"             type="xsd:string"/>
> > +      <xsd:attribute name="ref_frames"           type="xsd:int"/>
> >  
> >        <!-- audio attributes -->
> >        <xsd:attribute name="sample_fmt"       type="xsd:string"/>
> > diff --git a/ffprobe.c b/ffprobe.c
> > index 24ecafd..456ffbd 100644
> > --- a/ffprobe.c
> > +++ b/ffprobe.c
> > @@ -2141,6 +2141,7 @@ static int show_stream(WriterContext *w, AVFormatContext *fmt_ctx, int stream_id
> >              } else {
> >                  print_str_opt("timecode", "N/A");
> >              }
> > +            print_int("ref_frames", dec_ctx->refs);
> 
> Nit: I'd prefer to keep the same name as in the AVCodecContext, so

changed


> that hit's easier to map ffprobe output to the various fields. On the
> other hand the new name is more meaningful.
> 
> [...]
> 
> Patch looks good, thanks.

applied

thx

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

While the State exists there can be no freedom; when there is freedom there
will be no State. -- Vladimir Lenin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20141230/432bda07/attachment.asc>


More information about the ffmpeg-devel mailing list