diff options
author | Dale Curtis <dalecurtis@chromium.org> | 2020-05-15 12:37:02 -0700 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2020-05-31 00:52:08 +0200 |
commit | 57564a2cfc9c424d137e8279955ac9e892c8d794 (patch) | |
tree | 86f9c1b275522bc6356a75ab3c51d5f3c2b15d45 | |
parent | 1329db8cfb63e1c87e9aa2d514ca9eaf20939228 (diff) | |
download | ffmpeg-57564a2cfc9c424d137e8279955ac9e892c8d794.tar.gz |
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>
-rw-r--r-- | libavformat/oggparsetheora.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/oggparsetheora.c b/libavformat/oggparsetheora.c index c481a79d4b..d1064e4328 100644 --- a/libavformat/oggparsetheora.c +++ b/libavformat/oggparsetheora.c @@ -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; |