Commit cb6f8245 authored by Martin Storsjö's avatar Martin Storsjö

cmdutils: Allow calling filter_codec_opts without a set encoder

In this case, no encoder specific options are filtered, only
options specific to that codec type in general.
Signed-off-by: default avatarMartin Storsjö <martin@martin.st>
parent 86611ff1
...@@ -1462,10 +1462,8 @@ AVDictionary *filter_codec_opts(AVDictionary *opts, enum AVCodecID codec_id, ...@@ -1462,10 +1462,8 @@ AVDictionary *filter_codec_opts(AVDictionary *opts, enum AVCodecID codec_id,
if (!codec) if (!codec)
codec = s->oformat ? avcodec_find_encoder(codec_id) codec = s->oformat ? avcodec_find_encoder(codec_id)
: avcodec_find_decoder(codec_id); : avcodec_find_decoder(codec_id);
if (!codec)
return NULL;
switch (codec->type) { switch (st->codec->codec_type) {
case AVMEDIA_TYPE_VIDEO: case AVMEDIA_TYPE_VIDEO:
prefix = 'v'; prefix = 'v';
flags |= AV_OPT_FLAG_VIDEO_PARAM; flags |= AV_OPT_FLAG_VIDEO_PARAM;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment