mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-24 13:56:33 +02:00
avformat/demux: don't truncate the return value of ts_to_samples()
Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
parent
928e7c60cc
commit
0ea87ebc19
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user