[FFmpeg-devel] [PATCH] ffprobe: set codec options when opening the decoder with avcodec_open2()
Stefano Sabatini
stefasab at gmail.com
Thu Mar 7 02:18:53 CET 2013
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.
--
FFmpeg = Foolish & F*** Magic Proud Ecletic Guru
More information about the ffmpeg-devel
mailing list