mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-15 19:40:07 +01:00
avformat/oggparsedaala: Check duration for AV_NOPTS_VALUE
This avoids an integer overflow the solution matches oggparsevorbis.c and45581ed15dFixes: 700242 Found-by: Thomas Guilbert <tguilbert@google.com> Reviewed-by: Rostislav Pehlivanov <atomnuker@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit679a315424) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
@@ -232,7 +232,7 @@ static int daala_packet(AVFormatContext *s, int idx)
|
||||
os->lastpts = os->lastdts = daala_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 != AV_NOPTS_VALUE)
|
||||
s->streams[idx]->duration -= s->streams[idx]->start_time;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user