]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/oggparseopus.c
avformat/matroskadec: Fix rounding error with codec_delay
[ffmpeg] / libavformat / oggparseopus.c
index 99aa4398dd553bfb937313ee51cf4694d503b0fe..f45ad848744a47934928345887de68aedb7d7e13 100644 (file)
@@ -117,7 +117,7 @@ static int opus_packet(AVFormatContext *avf, int idx)
 
     if (!os->psize)
         return AVERROR_INVALIDDATA;
-    if (os->granule > INT64_MAX - UINT32_MAX) {
+    if (os->granule > (1LL << 62)) {
         av_log(avf, AV_LOG_ERROR, "Unsupported huge granule pos %"PRId64 "\n", os->granule);
         return AVERROR_INVALIDDATA;
     }