diff --git a/libavformat/oggparsetheora.c b/libavformat/oggparsetheora.c index 87a676fe482f29a96a8f269d776637619b5bf52f..c481a79d4b7a92fc909fd5407943b33964c217c3 100644 --- a/libavformat/oggparsetheora.c +++ b/libavformat/oggparsetheora.c @@ -191,7 +191,7 @@ static int theora_packet(AVFormatContext *s, int idx) pts = theora_gptopts(s, idx, os->granule, NULL); if (pts != AV_NOPTS_VALUE) - pts -= duration; + pts = av_sat_sub64(pts, duration); os->lastpts = os->lastdts = pts; if(s->streams[idx]->start_time == AV_NOPTS_VALUE) { s->streams[idx]->start_time = os->lastpts;