[FFmpeg-cvslog] avformat/oggparsetheora: Don't update start time when lastpts is AV_NOPTS_VALUE.
Dale Curtis
git at videolan.org
Sun May 31 02:10:58 EEST 2020
ffmpeg | branch: master | Dale Curtis <dalecurtis at chromium.org> | Fri May 15 12:37:02 2020 -0700| [57564a2cfc9c424d137e8279955ac9e892c8d794] | committer: Michael Niedermayer
avformat/oggparsetheora: Don't update start time when lastpts is AV_NOPTS_VALUE.
Signed-off-by: Dale Curtis <dalecurtis at chromium.org>
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=57564a2cfc9c424d137e8279955ac9e892c8d794
---
libavformat/oggparsetheora.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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;
More information about the ffmpeg-cvslog
mailing list