|
|
@ -297,6 +297,7 @@ int opt_default(const char *opt, const char *arg){ |
|
|
|
int opt_types[]={AV_OPT_FLAG_VIDEO_PARAM, AV_OPT_FLAG_AUDIO_PARAM, 0, AV_OPT_FLAG_SUBTITLE_PARAM, 0}; |
|
|
|
int opt_types[]={AV_OPT_FLAG_VIDEO_PARAM, AV_OPT_FLAG_AUDIO_PARAM, 0, AV_OPT_FLAG_SUBTITLE_PARAM, 0}; |
|
|
|
AVCodec *p = NULL; |
|
|
|
AVCodec *p = NULL; |
|
|
|
AVOutputFormat *oformat = NULL; |
|
|
|
AVOutputFormat *oformat = NULL; |
|
|
|
|
|
|
|
AVInputFormat *iformat = NULL; |
|
|
|
|
|
|
|
|
|
|
|
while ((p = av_codec_next(p))) { |
|
|
|
while ((p = av_codec_next(p))) { |
|
|
|
AVClass *c = p->priv_class; |
|
|
|
AVClass *c = p->priv_class; |
|
|
@ -312,6 +313,13 @@ int opt_default(const char *opt, const char *arg){ |
|
|
|
} |
|
|
|
} |
|
|
|
if (oformat) |
|
|
|
if (oformat) |
|
|
|
goto out; |
|
|
|
goto out; |
|
|
|
|
|
|
|
while ((iformat = av_iformat_next(iformat))) { |
|
|
|
|
|
|
|
const AVClass *c = iformat->priv_class; |
|
|
|
|
|
|
|
if (c && av_find_opt(&c, opt, NULL, 0, 0)) |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (iformat) |
|
|
|
|
|
|
|
goto out; |
|
|
|
|
|
|
|
|
|
|
|
for(type=0; *avcodec_opts && type<AVMEDIA_TYPE_NB && ret>= 0; type++){ |
|
|
|
for(type=0; *avcodec_opts && type<AVMEDIA_TYPE_NB && ret>= 0; type++){ |
|
|
|
const AVOption *o2 = av_find_opt(avcodec_opts[0], opt, NULL, opt_types[type], opt_types[type]); |
|
|
|
const AVOption *o2 = av_find_opt(avcodec_opts[0], opt, NULL, opt_types[type], opt_types[type]); |
|
|
@ -415,6 +423,8 @@ void set_context_opts(void *ctx, void *opts_ctx, int flags, AVCodec *codec) |
|
|
|
AVFormatContext *avctx = ctx; |
|
|
|
AVFormatContext *avctx = ctx; |
|
|
|
if (avctx->oformat && avctx->oformat->priv_class) { |
|
|
|
if (avctx->oformat && avctx->oformat->priv_class) { |
|
|
|
priv_ctx = avctx->priv_data; |
|
|
|
priv_ctx = avctx->priv_data; |
|
|
|
|
|
|
|
} else if (avctx->iformat && avctx->iformat->priv_class) { |
|
|
|
|
|
|
|
priv_ctx = avctx->priv_data; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|