1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

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>
This commit is contained in:
Dale Curtis 2020-05-15 12:37:02 -07:00 committed by Michael Niedermayer
parent 1329db8cfb
commit 57564a2cfc

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;