Commit 57564a2c authored by Dale Curtis's avatar Dale Curtis Committed by Michael Niedermayer

avformat/oggparsetheora: Don't update start time when lastpts is AV_NOPTS_VALUE.

Signed-off-by: 's avatarDale Curtis <dalecurtis@chromium.org>
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 1329db8c
......@@ -193,7 +193,7 @@ static int theora_packet(AVFormatContext *s, int idx)
if (pts != AV_NOPTS_VALUE)
pts = av_sat_sub64(pts, duration);
os->lastpts = os->lastdts = pts;
if(s->streams[idx]->start_time == AV_NOPTS_VALUE) {
if(s->streams[idx]->start_time == AV_NOPTS_VALUE && os->lastpts != AV_NOPTS_VALUE) {
s->streams[idx]->start_time = os->lastpts;
if (s->streams[idx]->duration > 0)
s->streams[idx]->duration -= s->streams[idx]->start_time;
......
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