libavformat/oggparseopus.c:120: error: Integer Overflow L2
  ([-960, 960] - [-960, 960]):unsigned64.

libavformat/oggparseopus.c:92:5: <LHS trace>
90.     struct oggopus_private *priv = os->private;
91.     uint8_t *packet              = os->buf + os->pstart;
92.     unsigned toc, toc_config, toc_count, frame_size, nb_frames = 1;
        ^
93. 
94.     if (!os->psize)

libavformat/oggparseopus.c:92:5: Assignment
90.     struct oggopus_private *priv = os->private;
91.     uint8_t *packet              = os->buf + os->pstart;
92.     unsigned toc, toc_config, toc_count, frame_size, nb_frames = 1;
        ^
93. 
94.     if (!os->psize)

libavformat/oggparseopus.c:111:5: Assignment
109.     }
110. 
111.     os->pduration = frame_size * nb_frames;
         ^
112.     if (os->lastpts != AV_NOPTS_VALUE) {
113.         if (st->start_time == AV_NOPTS_VALUE)

libavformat/oggparseopus.c:115:39: Assignment
113.         if (st->start_time == AV_NOPTS_VALUE)
114.             st->start_time = os->lastpts;
115.         priv->cur_dts = os->lastdts = os->lastpts -= priv->pre_skip;
                                           ^
116.     }
117. 

libavformat/oggparseopus.c:115:25: Assignment
113.         if (st->start_time == AV_NOPTS_VALUE)
114.             st->start_time = os->lastpts;
115.         priv->cur_dts = os->lastdts = os->lastpts -= priv->pre_skip;
                             ^
116.     }
117. 

libavformat/oggparseopus.c:115:9: Assignment
113.         if (st->start_time == AV_NOPTS_VALUE)
114.             st->start_time = os->lastpts;
115.         priv->cur_dts = os->lastdts = os->lastpts -= priv->pre_skip;
             ^
116.     }
117. 

libavformat/oggparseopus.c:118:5: Assignment
116.     }
117. 
118.     priv->cur_dts += os->pduration;
         ^
119.     if ((os->flags & OGG_FLAG_EOS)) {
120.         int64_t skip = priv->cur_dts - os->granule + priv->pre_skip;

libavformat/oggparseopus.c:92:5: <RHS trace>
90.     struct oggopus_private *priv = os->private;
91.     uint8_t *packet              = os->buf + os->pstart;
92.     unsigned toc, toc_config, toc_count, frame_size, nb_frames = 1;
        ^
93. 
94.     if (!os->psize)

libavformat/oggparseopus.c:92:5: Assignment
90.     struct oggopus_private *priv = os->private;
91.     uint8_t *packet              = os->buf + os->pstart;
92.     unsigned toc, toc_config, toc_count, frame_size, nb_frames = 1;
        ^
93. 
94.     if (!os->psize)

libavformat/oggparseopus.c:111:5: Assignment
109.     }
110. 
111.     os->pduration = frame_size * nb_frames;
         ^
112.     if (os->lastpts != AV_NOPTS_VALUE) {
113.         if (st->start_time == AV_NOPTS_VALUE)

libavformat/oggparseopus.c:115:39: Assignment
113.         if (st->start_time == AV_NOPTS_VALUE)
114.             st->start_time = os->lastpts;
115.         priv->cur_dts = os->lastdts = os->lastpts -= priv->pre_skip;
                                           ^
116.     }
117. 

libavformat/oggparseopus.c:115:25: Assignment
113.         if (st->start_time == AV_NOPTS_VALUE)
114.             st->start_time = os->lastpts;
115.         priv->cur_dts = os->lastdts = os->lastpts -= priv->pre_skip;
                             ^
116.     }
117. 

libavformat/oggparseopus.c:115:9: Assignment
113.         if (st->start_time == AV_NOPTS_VALUE)
114.             st->start_time = os->lastpts;
115.         priv->cur_dts = os->lastdts = os->lastpts -= priv->pre_skip;
             ^
116.     }
117. 

libavformat/oggparseopus.c:118:5: Assignment
116.     }
117. 
118.     priv->cur_dts += os->pduration;
         ^
119.     if ((os->flags & OGG_FLAG_EOS)) {
120.         int64_t skip = priv->cur_dts - os->granule + priv->pre_skip;

libavformat/oggparseopus.c:120:9: Binary operation: ([-960, 960] - [-960, 960]):unsigned64
118.     priv->cur_dts += os->pduration;
119.     if ((os->flags & OGG_FLAG_EOS)) {
120.         int64_t skip = priv->cur_dts - os->granule + priv->pre_skip;
             ^
121.         skip = FFMIN(skip, os->pduration);
122.         if (skip > 0) {

static int opus_packet(AVFormatContext *avf, int idx)
{
    struct ogg *ogg              = avf->priv_data;
    struct ogg_stream *os        = &ogg->streams[idx];
    AVStream *st                 = avf->streams[idx];
    struct oggopus_private *priv = os->private;
    uint8_t *packet              = os->buf + os->pstart;
    unsigned toc, toc_config, toc_count, frame_size, nb_frames = 1;
    if (!os->psize)
        return AVERROR_INVALIDDATA;
    toc        = *packet;
    toc_config = toc >> 3;
    toc_count  = toc & 3;
    frame_size = toc_config < 12 ? FFMAX(480, 960 * (toc_config & 3)) :
                 toc_config < 16 ? 480 << (toc_config & 1) :
                                   120 << (toc_config & 3);
    if (toc_count == 3) {
        if (os->psize < 2)
            return AVERROR_INVALIDDATA;
        nb_frames = packet[1] & 0x3F;
    } else if (toc_count) {
        nb_frames = 2;
    }
    os->pduration = frame_size * nb_frames;
    if (os->lastpts != AV_NOPTS_VALUE) {
        if (st->start_time == AV_NOPTS_VALUE)
            st->start_time = os->lastpts;
        priv->cur_dts = os->lastdts = os->lastpts -= priv->pre_skip;
    }
    priv->cur_dts += os->pduration;
    if ((os->flags & OGG_FLAG_EOS)) {
        int64_t skip = priv->cur_dts - os->granule + priv->pre_skip;
        skip = FFMIN(skip, os->pduration);
        if (skip > 0) {
            os->pduration = skip < os->pduration ? os->pduration - skip : 1;
            av_log(avf, AV_LOG_WARNING,
                   "Last packet is truncated to %d (because of unimplemented end trim support).\n",
                   os->pduration);
            return AVERROR_PATCHWELCOME;
        }
    }
    return 0;
}
['static int opus_packet(AVFormatContext *avf, int idx)\n{\n    struct ogg *ogg              = avf->priv_data;\n    struct ogg_stream *os        = &ogg->streams[idx];\n    AVStream *st                 = avf->streams[idx];\n    struct oggopus_private *priv = os->private;\n    uint8_t *packet              = os->buf + os->pstart;\n    unsigned toc, toc_config, toc_count, frame_size, nb_frames = 1;\n    if (!os->psize)\n        return AVERROR_INVALIDDATA;\n    toc        = *packet;\n    toc_config = toc >> 3;\n    toc_count  = toc & 3;\n    frame_size = toc_config < 12 ? FFMAX(480, 960 * (toc_config & 3)) :\n                 toc_config < 16 ? 480 << (toc_config & 1) :\n                                   120 << (toc_config & 3);\n    if (toc_count == 3) {\n        if (os->psize < 2)\n            return AVERROR_INVALIDDATA;\n        nb_frames = packet[1] & 0x3F;\n    } else if (toc_count) {\n        nb_frames = 2;\n    }\n    os->pduration = frame_size * nb_frames;\n    if (os->lastpts != AV_NOPTS_VALUE) {\n        if (st->start_time == AV_NOPTS_VALUE)\n            st->start_time = os->lastpts;\n        priv->cur_dts = os->lastdts = os->lastpts -= priv->pre_skip;\n    }\n    priv->cur_dts += os->pduration;\n    if ((os->flags & OGG_FLAG_EOS)) {\n        int64_t skip = priv->cur_dts - os->granule + priv->pre_skip;\n        skip = FFMIN(skip, os->pduration);\n        if (skip > 0) {\n            os->pduration = skip < os->pduration ? os->pduration - skip : 1;\n            av_log(avf, AV_LOG_WARNING,\n                   "Last packet is truncated to %d (because of unimplemented end trim support).\\n",\n                   os->pduration);\n            return AVERROR_PATCHWELCOME;\n        }\n    }\n    return 0;\n}']