Commit 8176799f authored by Michael Niedermayer's avatar Michael Niedermayer

avformat/mov: Only set pkt->duration to non negative values

Reviewed-by: 's avatarSasi Inguva <isasi@google.com>
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent daf38d07
......@@ -7586,7 +7586,9 @@ 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;
pkt->duration = next_dts - pkt->dts;
if (next_dts >= pkt->dts)
pkt->duration = next_dts - pkt->dts;
pkt->pts = pkt->dts;
}
if (st->discard == AVDISCARD_ALL)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment