git.videolan.org
/
ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
daf38d0
)
avformat/mov: Only set pkt->duration to non negative values
author
Michael Niedermayer
<michael@niedermayer.cc>
Wed, 16 May 2018 21:35:58 +0000
(23:35 +0200)
committer
Michael Niedermayer
<michael@niedermayer.cc>
Thu, 14 Jun 2018 16:55:45 +0000
(18:55 +0200)
Reviewed-by: Sasi Inguva <isasi@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavformat/mov.c
patch
|
blob
|
history
diff --git
a/libavformat/mov.c
b/libavformat/mov.c
index
5d9ffa6
..
0acf981
100644
(file)
--- a/
libavformat/mov.c
+++ b/
libavformat/mov.c
@@
-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)