mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
avformat/oggparsetheora: Check duration to be not AV_NOPTS_VALUE (and positive) before use
Fixes: 1536b9b096a8f95b742bae9d3d761cc6/signal_sigsegv_294aaed_7322_4fad88a38dc8952dc20dcb60c1895758.ogg Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
2ff61c3c1a
commit
0c1d62ab9d
@ -191,7 +191,7 @@ static int theora_packet(AVFormatContext *s, int idx)
|
||||
os->lastpts = os->lastdts = theora_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 > 0)
|
||||
s->streams[idx]->duration -= s->streams[idx]->start_time;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user