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

Stefano Sabatini stefasab at gmail.com
Sun Mar 10 15:45:22 CET 2013


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004-ffprobe-support-codec-options.patch
Type: text/x-diff
Size: 2808 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20130310/5dd1cacd/attachment.bin>


More information about the ffmpeg-devel mailing list