Browse Source

ffmpeg: look for encoding options in both avcodec and avformat

This patch is the same as 8a1714ad85 but
applied to encoding. It fixes the current clash of the -password option
between tta decoder and the icecast protocol.
tags/n2.4
Clément Bœsch 11 years ago
parent
commit
11aab8d6cb
1 changed files with 6 additions and 1 deletions
  1. +6
    -1
      ffmpeg_opt.c

+ 6
- 1
ffmpeg_opt.c View File

@@ -2014,8 +2014,13 @@ loop_end:
const AVClass *class = avcodec_get_class();
const AVOption *option = av_opt_find(&class, e->key, NULL, 0,
AV_OPT_SEARCH_CHILDREN | AV_OPT_SEARCH_FAKE_OBJ);
if (!option)
const AVClass *fclass = avformat_get_class();
const AVOption *foption = av_opt_find(&fclass, e->key, NULL, 0,
AV_OPT_SEARCH_CHILDREN | AV_OPT_SEARCH_FAKE_OBJ);
if (!option || foption)
continue;


if (!(option->flags & AV_OPT_FLAG_ENCODING_PARAM)) {
av_log(NULL, AV_LOG_ERROR, "Codec AVOption %s (%s) specified for "
"output file #%d (%s) is not an encoding option.\n", e->key,


Loading…
Cancel
Save