fftools/ffmpeg: move initializing next_[pd]ts to add_input_streams()

They are initialized to constants, so it makes most sense to do it as
soon as possible.
pull/389/head
Anton Khirnov 2 years ago
parent 8e23a62eff
commit 87e9f5ad3c
  1. 3
      fftools/ffmpeg.c
  2. 3
      fftools/ffmpeg_demux.c

@ -2848,9 +2848,6 @@ static int init_input_stream(InputStream *ist, char *error, int error_len)
assert_avoptions(ist->decoder_opts);
}
ist->next_pts = AV_NOPTS_VALUE;
ist->next_dts = AV_NOPTS_VALUE;
return 0;
}

@ -675,6 +675,9 @@ static void add_input_streams(const OptionsContext *o, Demuxer *d)
st->discard = AVDISCARD_ALL;
ist->nb_samples = 0;
ist->first_dts = AV_NOPTS_VALUE;
ist->next_pts = AV_NOPTS_VALUE;
ist->next_dts = AV_NOPTS_VALUE;
ds->min_pts = INT64_MAX;
ds->max_pts = INT64_MIN;

Loading…
Cancel
Save