mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-25 16:52:31 +00:00
fftools/ffmpeg_dec: move flags to DecoderOpts
Will be useful in the following commit.
This commit is contained in:
parent
4bdffec814
commit
e0a6cb07b2
@ -287,6 +287,8 @@ enum DecoderFlags {
|
||||
};
|
||||
|
||||
typedef struct DecoderOpts {
|
||||
int flags;
|
||||
|
||||
/* hwaccel options */
|
||||
enum HWAccelID hwaccel_id;
|
||||
enum AVHWDeviceType hwaccel_device_type;
|
||||
@ -738,7 +740,7 @@ AVBufferRef *hw_device_for_filter(void);
|
||||
* is transferred to the decoder.
|
||||
*/
|
||||
int dec_open(InputStream *ist, Scheduler *sch, unsigned sch_idx,
|
||||
AVDictionary **dec_opts, int flags, const DecoderOpts *o);
|
||||
AVDictionary **dec_opts, const DecoderOpts *o);
|
||||
void dec_free(Decoder **pdec);
|
||||
|
||||
int dec_add_filter(Decoder *dec, InputFilter *ifilter);
|
||||
|
@ -943,7 +943,7 @@ static const AVClass dec_class = {
|
||||
};
|
||||
|
||||
int dec_open(InputStream *ist, Scheduler *sch, unsigned sch_idx,
|
||||
AVDictionary **dec_opts, int flags, const DecoderOpts *o)
|
||||
AVDictionary **dec_opts, const DecoderOpts *o)
|
||||
{
|
||||
DecoderPriv *dp;
|
||||
const AVCodec *codec = ist->dec;
|
||||
@ -957,7 +957,7 @@ int dec_open(InputStream *ist, Scheduler *sch, unsigned sch_idx,
|
||||
dp->sch = sch;
|
||||
dp->sch_idx = sch_idx;
|
||||
|
||||
dp->flags = flags;
|
||||
dp->flags = o->flags;
|
||||
dp->dec.class = &dec_class;
|
||||
dp->log_parent = ist;
|
||||
|
||||
|
@ -893,8 +893,6 @@ static int ist_use(InputStream *ist, int decoding_needed)
|
||||
|
||||
if (decoding_needed && ds->sch_idx_dec < 0) {
|
||||
int is_audio = ist->st->codecpar->codec_type == AVMEDIA_TYPE_AUDIO;
|
||||
int dec_flags = (!!ist->fix_sub_duration * DECODER_FLAG_FIX_SUB_DURATION) |
|
||||
(!!(d->f.ctx->iformat->flags & AVFMT_NOTIMESTAMPS) * DECODER_FLAG_TS_UNRELIABLE);
|
||||
|
||||
ret = sch_add_dec(d->sch, decoder_thread, ist, d->loop && is_audio);
|
||||
if (ret < 0)
|
||||
@ -906,8 +904,11 @@ static int ist_use(InputStream *ist, int decoding_needed)
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
ds->dec_opts.flags = (!!ist->fix_sub_duration * DECODER_FLAG_FIX_SUB_DURATION) |
|
||||
(!!(d->f.ctx->iformat->flags & AVFMT_NOTIMESTAMPS) * DECODER_FLAG_TS_UNRELIABLE);
|
||||
|
||||
ret = dec_open(ist, d->sch, ds->sch_idx_dec,
|
||||
&ist->decoder_opts, dec_flags, &ds->dec_opts);
|
||||
&ist->decoder_opts, &ds->dec_opts);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user