mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-26 01:02:33 +00:00
fftools/ffmpeg: move ts_scale to DemuxStream
It is not needed outside of ffmpeg_demux.
This commit is contained in:
parent
66c1e956aa
commit
156ca86569
@ -385,7 +385,6 @@ typedef struct InputStream {
|
|||||||
|
|
||||||
int64_t nb_samples; /* number of samples in the last decoded audio frame before looping */
|
int64_t nb_samples; /* number of samples in the last decoded audio frame before looping */
|
||||||
|
|
||||||
double ts_scale;
|
|
||||||
int saw_first_ts;
|
int saw_first_ts;
|
||||||
AVDictionary *decoder_opts;
|
AVDictionary *decoder_opts;
|
||||||
AVRational framerate; /* framerate forced with -r */
|
AVRational framerate; /* framerate forced with -r */
|
||||||
|
@ -58,6 +58,8 @@ typedef struct DemuxStream {
|
|||||||
// name used for logging
|
// name used for logging
|
||||||
char log_name[32];
|
char log_name[32];
|
||||||
|
|
||||||
|
double ts_scale;
|
||||||
|
|
||||||
int64_t min_pts; /* pts with the smallest value in a current stream */
|
int64_t min_pts; /* pts with the smallest value in a current stream */
|
||||||
int64_t max_pts; /* pts with the higher value in a current stream */
|
int64_t max_pts; /* pts with the higher value in a current stream */
|
||||||
} DemuxStream;
|
} DemuxStream;
|
||||||
@ -225,9 +227,9 @@ static void ts_fixup(Demuxer *d, AVPacket *pkt, int *repeat_pict)
|
|||||||
pkt->pts += av_rescale_q(ifile->ts_offset, AV_TIME_BASE_Q, ist->st->time_base);
|
pkt->pts += av_rescale_q(ifile->ts_offset, AV_TIME_BASE_Q, ist->st->time_base);
|
||||||
|
|
||||||
if (pkt->pts != AV_NOPTS_VALUE)
|
if (pkt->pts != AV_NOPTS_VALUE)
|
||||||
pkt->pts *= ist->ts_scale;
|
pkt->pts *= ds->ts_scale;
|
||||||
if (pkt->dts != AV_NOPTS_VALUE)
|
if (pkt->dts != AV_NOPTS_VALUE)
|
||||||
pkt->dts *= ist->ts_scale;
|
pkt->dts *= ds->ts_scale;
|
||||||
|
|
||||||
duration = av_rescale_q(d->duration, d->time_base, ist->st->time_base);
|
duration = av_rescale_q(d->duration, d->time_base, ist->st->time_base);
|
||||||
if (pkt->pts != AV_NOPTS_VALUE) {
|
if (pkt->pts != AV_NOPTS_VALUE) {
|
||||||
@ -670,8 +672,8 @@ static void add_input_streams(const OptionsContext *o, Demuxer *d)
|
|||||||
ds->min_pts = INT64_MAX;
|
ds->min_pts = INT64_MAX;
|
||||||
ds->max_pts = INT64_MIN;
|
ds->max_pts = INT64_MIN;
|
||||||
|
|
||||||
ist->ts_scale = 1.0;
|
ds->ts_scale = 1.0;
|
||||||
MATCH_PER_STREAM_OPT(ts_scale, dbl, ist->ts_scale, ic, st);
|
MATCH_PER_STREAM_OPT(ts_scale, dbl, ds->ts_scale, ic, st);
|
||||||
|
|
||||||
ist->autorotate = 1;
|
ist->autorotate = 1;
|
||||||
MATCH_PER_STREAM_OPT(autorotate, i, ist->autorotate, ic, st);
|
MATCH_PER_STREAM_OPT(autorotate, i, ist->autorotate, ic, st);
|
||||||
|
Loading…
Reference in New Issue
Block a user