Browse Source

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

Signed-off-by: Dale Curtis <dalecurtis@chromium.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
tags/n4.3
Dale Curtis Michael Niedermayer 5 years ago
parent
commit
57564a2cfc
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavformat/oggparsetheora.c

+ 1
- 1
libavformat/oggparsetheora.c View File

@@ -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;


Loading…
Cancel
Save