Message ID | 2fcab6e0-bd83-a127-dd36-dbcf92b88834@googlemail.com |
---|---|
State | Accepted |
Commit | ff5f4bd97654d9089b0d735178f8bfe122d8d49c |
Headers | show |
On Fri, Nov 25, 2016 at 09:57:57PM +0100, Andreas Cadhalpun wrote: > Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> > --- > libavformat/utils.c | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) LGTM thx [...]
On 26.11.2016 01:54, Michael Niedermayer wrote: > On Fri, Nov 25, 2016 at 09:57:57PM +0100, Andreas Cadhalpun wrote: >> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> >> --- >> libavformat/utils.c | 6 +++++- >> 1 file changed, 5 insertions(+), 1 deletion(-) > > LGTM Pushed. Best regards, Andreas
diff --git a/libavformat/utils.c b/libavformat/utils.c index 2634317..b1d0a0a 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -3695,9 +3695,13 @@ FF_ENABLE_DEPRECATION_WARNINGS if (!has_codec_parameters(st, NULL)) { const AVCodec *codec = find_probe_decoder(ic, st, st->codecpar->codec_id); if (codec && !avctx->codec) { - if (avcodec_open2(avctx, codec, (options && stream_index < orig_nb_streams) ? &options[stream_index] : NULL) < 0) + AVDictionary *opts = NULL; + if (ic->codec_whitelist) + av_dict_set(&opts, "codec_whitelist", ic->codec_whitelist, 0); + if (avcodec_open2(avctx, codec, (options && stream_index < orig_nb_streams) ? &options[stream_index] : &opts) < 0) av_log(ic, AV_LOG_WARNING, "Failed to open codec in av_find_stream_info\n"); + av_dict_free(&opts); } }
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> --- libavformat/utils.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)