[FFmpeg-devel] [PATCH] ffprobe: set codec options when opening the decoder with avcodec_open2()

Stefano Sabatini stefasab at gmail.com
Wed Mar 13 00:42:48 CET 2013


On date Sunday 2013-03-10 15:45:22 +0100, Stefano Sabatini encoded:
> On date Thursday 2013-03-07 02:18:53 +0100, Stefano Sabatini encoded:
> > On date Thursday 2013-03-07 02:12:36 +0100, Stefano Sabatini encoded:
> > > ---
> > >  ffprobe.c |    2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > 
> > > diff --git a/ffprobe.c b/ffprobe.c
> > > index 940e979..c3f60f3 100644
> > > --- a/ffprobe.c
> > > +++ b/ffprobe.c
> > > @@ -1829,7 +1829,7 @@ static int open_input_file(AVFormatContext **fmt_ctx_ptr, const char *filename)
> > >              av_log(NULL, AV_LOG_ERROR,
> > >                      "Unsupported codec with id %d for input stream %d\n",
> > >                      stream->codec->codec_id, stream->index);
> > > -        } else if (avcodec_open2(stream->codec, codec, NULL) < 0) {
> > > +        } else if (avcodec_open2(stream->codec, codec, &codec_opts) < 0) {
> > >              av_log(NULL, AV_LOG_ERROR, "Error while opening codec for input stream %d\n",
> > >                     stream->index);
> > >          }
> > 
> > In particular, fixes:
> > https://ffmpeg.org/trac/ffmpeg/ticket/1859
> > 
> > Didn't push because I'm not sure if I should rather use
> > filter_codec_opts() like in ffplay.c (but not used in ffmpeg.c) and
> > it's too late to check.
> 
> Updated, will push in a day if I see no comments.
> -- 
> FFmpeg = Fanciful Fancy Minimal Powerful Ephemeral Glue

> From 385e18c25245dde147ab3b3a5ae0e1481fa65491 Mon Sep 17 00:00:00 2001
> From: Stefano Sabatini <stefasab at gmail.com>
> Date: Thu, 7 Mar 2013 00:47:59 +0100
> Subject: [PATCH] ffprobe: support codec options
> 
> Make ffprobe honour codec options, and support stream specifiers like it
> is done in ffplay.
> 
> In particular, address Trac ticket #1859.
> ---
>  ffprobe.c |   27 +++++++++++++++++++++------
>  1 file changed, 21 insertions(+), 6 deletions(-)
[...]

Applied. Note to self: I should extend documentation, this includes
ffplay, for which this already implemented feature should allow to
discard a few program options.
-- 
FFmpeg = Funny & Fancy Majestic Puritan Ecumenical God


More information about the ffmpeg-devel mailing list