mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
avconv: rename InputStream.opts to InputStream.decoder_opts
This makes it more clear what is this variable for exactly.
This commit is contained in:
parent
73ed8558a6
commit
f3a6ad22c9
10
avconv.c
10
avconv.c
@ -202,7 +202,7 @@ static void avconv_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);
|
||||||
av_freep(&ist->filters);
|
av_freep(&ist->filters);
|
||||||
av_freep(&ist->hwaccel_device);
|
av_freep(&ist->hwaccel_device);
|
||||||
|
|
||||||
@ -1566,9 +1566,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) {
|
||||||
char errbuf[128];
|
char errbuf[128];
|
||||||
if (ret == AVERROR_EXPERIMENTAL)
|
if (ret == AVERROR_EXPERIMENTAL)
|
||||||
abort_codec_experimental(codec, 0);
|
abort_codec_experimental(codec, 0);
|
||||||
@ -1581,7 +1581,7 @@ static int init_input_stream(int ist_index, char *error, int error_len)
|
|||||||
ist->file_index, ist->st->index, errbuf);
|
ist->file_index, ist->st->index, errbuf);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
assert_avoptions(ist->opts);
|
assert_avoptions(ist->decoder_opts);
|
||||||
}
|
}
|
||||||
|
|
||||||
ist->last_dts = ist->st->avg_frame_rate.num ? - ist->st->codec->has_b_frames * AV_TIME_BASE / av_q2d(ist->st->avg_frame_rate) : 0;
|
ist->last_dts = ist->st->avg_frame_rate.num ? - ist->st->codec->has_b_frames * AV_TIME_BASE / av_q2d(ist->st->avg_frame_rate) : 0;
|
||||||
|
2
avconv.h
2
avconv.h
@ -231,7 +231,7 @@ typedef struct InputStream {
|
|||||||
PtsCorrectionContext pts_ctx;
|
PtsCorrectionContext pts_ctx;
|
||||||
double ts_scale;
|
double ts_scale;
|
||||||
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 resample_height;
|
int resample_height;
|
||||||
|
@ -492,7 +492,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);
|
||||||
|
|
||||||
switch (dec->codec_type) {
|
switch (dec->codec_type) {
|
||||||
case AVMEDIA_TYPE_VIDEO:
|
case AVMEDIA_TYPE_VIDEO:
|
||||||
@ -754,7 +754,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);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user