diff options
author | James Almer <jamrial@gmail.com> | 2022-02-01 04:56:48 +0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2022-02-05 15:44:59 +0300 |
commit | 0ea87ebc19c843747d6e3f7e060e2f2da634eb03 (patch) | |
tree | 96b1fe7b293149f0657e422dd720f0dc884c2a09 /libavformat | |
parent | 928e7c60cc5f220e931df51392b5577b253ffa23 (diff) |
avformat/demux: don't truncate the return value of ts_to_samples()
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/demux.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/demux.c b/libavformat/demux.c index 4509015847..ec34b65288 100644 --- a/libavformat/demux.c +++ b/libavformat/demux.c @@ -1346,7 +1346,7 @@ static int read_frame_internal(AVFormatContext *s, AVPacket *pkt) if (sti->first_discard_sample && pkt->pts != AV_NOPTS_VALUE) { int64_t pts = pkt->pts - (is_relative(pkt->pts) ? RELATIVE_TS_BASE : 0); int64_t sample = ts_to_samples(st, pts); - int duration = ts_to_samples(st, pkt->duration); + int64_t duration = ts_to_samples(st, pkt->duration); int64_t end_sample = sample + duration; if (duration > 0 && end_sample >= sti->first_discard_sample && sample < sti->last_discard_sample) |