Commit 42b7bda4 authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit 'f3a6ad22'

* commit 'f3a6ad22':
  avconv: rename InputStream.opts to InputStream.decoder_opts

Conflicts:
	ffmpeg.c
Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents 6e397074 f3a6ad22
...@@ -501,7 +501,7 @@ static void ffmpeg_cleanup(int ret) ...@@ -501,7 +501,7 @@ static void ffmpeg_cleanup(int ret)
av_frame_free(&ist->decoded_frame); av_frame_free(&ist->decoded_frame);
av_frame_free(&ist->filter_frame); av_frame_free(&ist->filter_frame);
av_dict_free(&ist->opts); av_dict_free(&ist->decoder_opts);
avsubtitle_free(&ist->prev_sub.subtitle); avsubtitle_free(&ist->prev_sub.subtitle);
av_frame_free(&ist->sub2video.frame); av_frame_free(&ist->sub2video.frame);
av_freep(&ist->filters); av_freep(&ist->filters);
...@@ -2249,9 +2249,9 @@ static int init_input_stream(int ist_index, char *error, int error_len) ...@@ -2249,9 +2249,9 @@ static int init_input_stream(int ist_index, char *error, int error_len)
av_opt_set_int(ist->st->codec, "refcounted_frames", 1, 0); av_opt_set_int(ist->st->codec, "refcounted_frames", 1, 0);
if (!av_dict_get(ist->opts, "threads", NULL, 0)) if (!av_dict_get(ist->decoder_opts, "threads", NULL, 0))
av_dict_set(&ist->opts, "threads", "auto", 0); av_dict_set(&ist->decoder_opts, "threads", "auto", 0);
if ((ret = avcodec_open2(ist->st->codec, codec, &ist->opts)) < 0) { if ((ret = avcodec_open2(ist->st->codec, codec, &ist->decoder_opts)) < 0) {
if (ret == AVERROR_EXPERIMENTAL) if (ret == AVERROR_EXPERIMENTAL)
abort_codec_experimental(codec, 0); abort_codec_experimental(codec, 0);
...@@ -2261,7 +2261,7 @@ static int init_input_stream(int ist_index, char *error, int error_len) ...@@ -2261,7 +2261,7 @@ static int init_input_stream(int ist_index, char *error, int error_len)
ist->file_index, ist->st->index, av_err2str(ret)); ist->file_index, ist->st->index, av_err2str(ret));
return ret; return ret;
} }
assert_avoptions(ist->opts); assert_avoptions(ist->decoder_opts);
} }
ist->next_pts = AV_NOPTS_VALUE; ist->next_pts = AV_NOPTS_VALUE;
......
...@@ -258,7 +258,7 @@ typedef struct InputStream { ...@@ -258,7 +258,7 @@ typedef struct InputStream {
double ts_scale; double ts_scale;
int saw_first_ts; int saw_first_ts;
int showed_multi_packet_warning; int showed_multi_packet_warning;
AVDictionary *opts; AVDictionary *decoder_opts;
AVRational framerate; /* framerate forced with -r */ AVRational framerate; /* framerate forced with -r */
int top_field_first; int top_field_first;
int guess_layout_max; int guess_layout_max;
......
...@@ -594,7 +594,7 @@ static void add_input_streams(OptionsContext *o, AVFormatContext *ic) ...@@ -594,7 +594,7 @@ static void add_input_streams(OptionsContext *o, AVFormatContext *ic)
} }
ist->dec = choose_decoder(o, ic, st); ist->dec = choose_decoder(o, ic, st);
ist->opts = filter_codec_opts(o->g->codec_opts, ist->st->codec->codec_id, ic, st, ist->dec); ist->decoder_opts = filter_codec_opts(o->g->codec_opts, ist->st->codec->codec_id, ic, st, ist->dec);
ist->reinit_filters = -1; ist->reinit_filters = -1;
MATCH_PER_STREAM_OPT(reinit_filters, i, ist->reinit_filters, ic, st); MATCH_PER_STREAM_OPT(reinit_filters, i, ist->reinit_filters, ic, st);
...@@ -908,7 +908,7 @@ static int open_input_file(OptionsContext *o, const char *filename) ...@@ -908,7 +908,7 @@ static int open_input_file(OptionsContext *o, const char *filename)
unused_opts = strip_specifiers(o->g->codec_opts); unused_opts = strip_specifiers(o->g->codec_opts);
for (i = f->ist_index; i < nb_input_streams; i++) { for (i = f->ist_index; i < nb_input_streams; i++) {
e = NULL; e = NULL;
while ((e = av_dict_get(input_streams[i]->opts, "", e, while ((e = av_dict_get(input_streams[i]->decoder_opts, "", e,
AV_DICT_IGNORE_SUFFIX))) AV_DICT_IGNORE_SUFFIX)))
av_dict_set(&unused_opts, e->key, NULL, 0); av_dict_set(&unused_opts, e->key, NULL, 0);
} }
......
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