mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-24 13:56:33 +02:00
fftools/ffmpeg: make InputStream.decoder_opts private to demuxer
It is no longer used outside of ffmpeg_demux.
This commit is contained in:
parent
01c71b78eb
commit
f4b76a1d6a
@ -349,7 +349,6 @@ typedef struct InputStream {
|
|||||||
|
|
||||||
AVRational framerate_guessed;
|
AVRational framerate_guessed;
|
||||||
|
|
||||||
AVDictionary *decoder_opts;
|
|
||||||
AVRational framerate; /* framerate forced with -r */
|
AVRational framerate; /* framerate forced with -r */
|
||||||
#if FFMPEG_OPT_TOP
|
#if FFMPEG_OPT_TOP
|
||||||
int top_field_first;
|
int top_field_first;
|
||||||
|
@ -77,6 +77,7 @@ typedef struct DemuxStream {
|
|||||||
|
|
||||||
const AVCodecDescriptor *codec_desc;
|
const AVCodecDescriptor *codec_desc;
|
||||||
|
|
||||||
|
AVDictionary *decoder_opts;
|
||||||
DecoderOpts dec_opts;
|
DecoderOpts dec_opts;
|
||||||
char dec_name[16];
|
char dec_name[16];
|
||||||
|
|
||||||
@ -828,7 +829,7 @@ static void ist_free(InputStream **pist)
|
|||||||
|
|
||||||
dec_free(&ist->decoder);
|
dec_free(&ist->decoder);
|
||||||
|
|
||||||
av_dict_free(&ist->decoder_opts);
|
av_dict_free(&ds->decoder_opts);
|
||||||
av_freep(&ist->filters);
|
av_freep(&ist->filters);
|
||||||
av_freep(&ist->outputs);
|
av_freep(&ist->outputs);
|
||||||
av_freep(&ds->dec_opts.hwaccel_device);
|
av_freep(&ds->dec_opts.hwaccel_device);
|
||||||
@ -916,7 +917,7 @@ static int ist_use(InputStream *ist, int decoding_needed)
|
|||||||
|
|
||||||
if (ist->dec->id == AV_CODEC_ID_DVB_SUBTITLE &&
|
if (ist->dec->id == AV_CODEC_ID_DVB_SUBTITLE &&
|
||||||
(ds->decoding_needed & DECODING_FOR_OST)) {
|
(ds->decoding_needed & DECODING_FOR_OST)) {
|
||||||
av_dict_set(&ist->decoder_opts, "compute_edt", "1", AV_DICT_DONT_OVERWRITE);
|
av_dict_set(&ds->decoder_opts, "compute_edt", "1", AV_DICT_DONT_OVERWRITE);
|
||||||
if (ds->decoding_needed & DECODING_FOR_FILTER)
|
if (ds->decoding_needed & DECODING_FOR_FILTER)
|
||||||
av_log(ist, AV_LOG_WARNING,
|
av_log(ist, AV_LOG_WARNING,
|
||||||
"Warning using DVB subtitles for filtering and output at the "
|
"Warning using DVB subtitles for filtering and output at the "
|
||||||
@ -932,7 +933,7 @@ static int ist_use(InputStream *ist, int decoding_needed)
|
|||||||
ds->dec_opts.log_parent = ist;
|
ds->dec_opts.log_parent = ist;
|
||||||
|
|
||||||
ret = dec_open(&ist->decoder, d->sch,
|
ret = dec_open(&ist->decoder, d->sch,
|
||||||
&ist->decoder_opts, &ds->dec_opts);
|
&ds->decoder_opts, &ds->dec_opts);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
ds->sch_idx_dec = ret;
|
ds->sch_idx_dec = ret;
|
||||||
@ -1267,7 +1268,7 @@ static int ist_add(const OptionsContext *o, Demuxer *d, AVStream *st)
|
|||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
ret = filter_codec_opts(o->g->codec_opts, ist->st->codecpar->codec_id,
|
ret = filter_codec_opts(o->g->codec_opts, ist->st->codecpar->codec_id,
|
||||||
ic, st, ist->dec, &ist->decoder_opts);
|
ic, st, ist->dec, &ds->decoder_opts);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
@ -1293,12 +1294,12 @@ static int ist_add(const OptionsContext *o, Demuxer *d, AVStream *st)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (o->bitexact)
|
if (o->bitexact)
|
||||||
av_dict_set(&ist->decoder_opts, "flags", "+bitexact", AV_DICT_MULTIKEY);
|
av_dict_set(&ds->decoder_opts, "flags", "+bitexact", AV_DICT_MULTIKEY);
|
||||||
|
|
||||||
/* Attached pics are sparse, therefore we would not want to delay their decoding
|
/* Attached pics are sparse, therefore we would not want to delay their decoding
|
||||||
* till EOF. */
|
* till EOF. */
|
||||||
if (ist->st->disposition & AV_DISPOSITION_ATTACHED_PIC)
|
if (ist->st->disposition & AV_DISPOSITION_ATTACHED_PIC)
|
||||||
av_dict_set(&ist->decoder_opts, "thread_type", "-frame", 0);
|
av_dict_set(&ds->decoder_opts, "thread_type", "-frame", 0);
|
||||||
|
|
||||||
switch (par->codec_type) {
|
switch (par->codec_type) {
|
||||||
case AVMEDIA_TYPE_VIDEO:
|
case AVMEDIA_TYPE_VIDEO:
|
||||||
@ -1772,8 +1773,9 @@ int ifile_open(const OptionsContext *o, const char *filename, Scheduler *sch)
|
|||||||
/* check if all codec options have been used */
|
/* check if all codec options have been used */
|
||||||
unused_opts = strip_specifiers(o->g->codec_opts);
|
unused_opts = strip_specifiers(o->g->codec_opts);
|
||||||
for (i = 0; i < f->nb_streams; i++) {
|
for (i = 0; i < f->nb_streams; i++) {
|
||||||
|
DemuxStream *ds = ds_from_ist(f->streams[i]);
|
||||||
e = NULL;
|
e = NULL;
|
||||||
while ((e = av_dict_iterate(f->streams[i]->decoder_opts, e)))
|
while ((e = av_dict_iterate(ds->decoder_opts, e)))
|
||||||
av_dict_set(&unused_opts, e->key, NULL, 0);
|
av_dict_set(&unused_opts, e->key, NULL, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user