mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-24 13:56:33 +02:00
fftools/ffmpeg_dec: pass AVCodec through DecoderOpts
Do not retrieve it from InputStream directly. This is a step towards decoupling Decoder and InputStream.
This commit is contained in:
parent
d5f9ef766b
commit
b3d1916ba0
@ -297,6 +297,8 @@ typedef struct DecoderOpts {
|
||||
|
||||
char *name;
|
||||
|
||||
const AVCodec *codec;
|
||||
|
||||
/* hwaccel options */
|
||||
enum HWAccelID hwaccel_id;
|
||||
enum AVHWDeviceType hwaccel_device_type;
|
||||
|
@ -951,7 +951,7 @@ int dec_open(InputStream *ist, Scheduler *sch, unsigned sch_idx,
|
||||
AVDictionary **dec_opts, const DecoderOpts *o)
|
||||
{
|
||||
DecoderPriv *dp;
|
||||
const AVCodec *codec = ist->dec;
|
||||
const AVCodec *codec = o->codec;
|
||||
int ret;
|
||||
|
||||
ret = dec_alloc(&ist->decoder);
|
||||
|
@ -930,6 +930,8 @@ static int ist_use(InputStream *ist, int decoding_needed)
|
||||
snprintf(ds->dec_name, sizeof(ds->dec_name), "%d:%d", ist->file->index, ist->index);
|
||||
ds->dec_opts.name = ds->dec_name;
|
||||
|
||||
ds->dec_opts.codec = ist->dec;
|
||||
|
||||
ret = dec_open(ist, d->sch, ds->sch_idx_dec,
|
||||
&ist->decoder_opts, &ds->dec_opts);
|
||||
if (ret < 0)
|
||||
|
Loading…
x
Reference in New Issue
Block a user