Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libavformat/oggdec.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavformat/oggdec.h b/libavformat/oggdec.h
index d7af1cfabd..4a2b6ddee8 100644
--- a/libavformat/oggdec.h
+++ b/libavformat/oggdec.h
@@ -162,6 +162,11 @@ ogg_gptopts (AVFormatContext * s, int i, uint64_t gp, int64_t *dts)
if (dts)
*dts = pts;
}
+ if (pts > INT64_MAX && pts != AV_NOPTS_VALUE) {
+ // The return type is unsigned, we thus cannot return negative pts
+ av_log(s, AV_LOG_ERROR, "invalid pts %"PRId64"\n", pts);
+ pts = AV_NOPTS_VALUE;
+ }
return pts;
}