diff options
author | Dale Curtis <[email protected]> | 2017-11-28 14:26:55 -0800 |
---|---|---|
committer | Michael Niedermayer <[email protected]> | 2018-01-31 22:56:14 +0100 |
commit | 8bea0c307dee3890c8d64c802ff34087ed0caf89 (patch) | |
tree | 067364c1a8a6368551db3bdc13d88ea47da433eb | |
parent | 1bc4e743f5618315b11478448058d8757d8c7576 (diff) |
Don't manipulate duration when it's AV_NOPTS_VALUE.
This leads to signed integer overflow.
Signed-off-by: Dale Curtis <[email protected]>
Signed-off-by: James Almer <[email protected]>
(cherry picked from commit c5fd57f483d2ad8e34551b78509f1e14136f73c0)
Signed-off-by: Michael Niedermayer <[email protected]>
-rw-r--r-- | libavformat/oggparsevp8.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/oggparsevp8.c b/libavformat/oggparsevp8.c index ca13928f1e..54f1fa6544 100644 --- a/libavformat/oggparsevp8.c +++ b/libavformat/oggparsevp8.c @@ -125,7 +125,7 @@ static int vp8_packet(AVFormatContext *s, int idx) os->lastdts = vp8_gptopts(s, idx, os->granule, NULL) - duration; if(s->streams[idx]->start_time == AV_NOPTS_VALUE) { s->streams[idx]->start_time = os->lastpts; - if (s->streams[idx]->duration) + if (s->streams[idx]->duration && s->streams[idx]->duration != AV_NOPTS_VALUE) s->streams[idx]->duration -= s->streams[idx]->start_time; } } |