fftools/ffmpeg_dec: pass decoder name through DecoderOpts

Do not build it from InputStream values.

This is a step towards decoupling Decoder and InputStream.
This commit is contained in:
Anton Khirnov
2024-01-23 18:42:20 +01:00
parent 9ba4bc87e6
commit 097f9ddbe9
3 changed files with 17 additions and 6 deletions

View File

@@ -73,6 +73,7 @@ typedef struct DemuxStream {
const AVCodecDescriptor *codec_desc;
DecoderOpts dec_opts;
char dec_name[16];
AVBSFContext *bsf;
@@ -926,6 +927,9 @@ static int ist_use(InputStream *ist, int decoding_needed)
"same time is not fully supported, also see -compute_edt [0|1]\n");
}
snprintf(ds->dec_name, sizeof(ds->dec_name), "%d:%d", ist->file->index, ist->index);
ds->dec_opts.name = ds->dec_name;
ret = dec_open(ist, d->sch, ds->sch_idx_dec,
&ist->decoder_opts, &ds->dec_opts);
if (ret < 0)