Commit fc54db32 authored by Dale Curtis's avatar Dale Curtis Committed by Michael Niedermayer

Use av_sat_sub64() when updating pts by duration.

Signed-off-by: 's avatarDale Curtis <dalecurtis@chromium.org>
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 9d24f293
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment