Browse Source

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: Martin Storsjö <martin@martin.st>
tags/n1.2
Martin Storsjö 12 years ago
parent
commit
cb6f8245ae
1 changed files with 1 additions and 3 deletions
  1. +1
    -3
      cmdutils.c

+ 1
- 3
cmdutils.c View File

@@ -1462,10 +1462,8 @@ AVDictionary *filter_codec_opts(AVDictionary *opts, enum AVCodecID codec_id,
if (!codec)
codec = s->oformat ? avcodec_find_encoder(codec_id)
: avcodec_find_decoder(codec_id);
if (!codec)
return NULL;

switch (codec->type) {
switch (st->codec->codec_type) {
case AVMEDIA_TYPE_VIDEO:
prefix = 'v';
flags |= AV_OPT_FLAG_VIDEO_PARAM;


Loading…
Cancel
Save