ffmpeg | branch: master | Dale Curtis <dalecur...@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 <dalecur...@chromium.org>
Signed-off-by: Michael Niedermayer <mich...@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;

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to