On Wed, May 18, 2016 at 04:37:57PM -0500, Rodger Combs wrote: > --- > ffmpeg_opt.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/ffmpeg_opt.c b/ffmpeg_opt.c > index c217462..84b312d 100644 > --- a/ffmpeg_opt.c > +++ b/ffmpeg_opt.c > @@ -618,7 +618,7 @@ static AVCodec *find_codec_or_die(const char *name, enum > AVMediaType type, int e > av_log(NULL, AV_LOG_FATAL, "Unknown %s '%s'\n", codec_string, name); > exit_program(1); > } > - if (codec->type != type) { > + if (codec->type != type && type != AVMEDIA_TYPE_UNKNOWN) { > av_log(NULL, AV_LOG_FATAL, "Invalid %s type '%s'\n", codec_string, > name); > exit_program(1); > } > @@ -633,6 +633,7 @@ static AVCodec *choose_decoder(OptionsContext *o, > AVFormatContext *s, AVStream * > if (codec_name) { > AVCodec *codec = find_codec_or_die(codec_name, > st->codec->codec_type, 0); > st->codec->codec_id = codec->id; > + st->codec->codec_type = codec->type;
choose_encoder() might need a similar change also a testcase for fate for this is probably a good idea [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB it is not once nor twice but times without number that the same ideas make their appearance in the world. -- Aristotle
signature.asc
Description: Digital signature
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel