mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
avformat/mov: Only set pkt->duration to non negative values
Reviewed-by: Sasi Inguva <isasi@google.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
daf38d0753
commit
8176799f31
@ -7586,6 +7586,8 @@ static int mov_read_packet(AVFormatContext *s, AVPacket *pkt)
|
||||
} else {
|
||||
int64_t next_dts = (sc->current_sample < st->nb_index_entries) ?
|
||||
st->index_entries[sc->current_sample].timestamp : st->duration;
|
||||
|
||||
if (next_dts >= pkt->dts)
|
||||
pkt->duration = next_dts - pkt->dts;
|
||||
pkt->pts = pkt->dts;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user