[FFmpeg-devel] [PATCH] avformat: add vividas demuxer
James Almer
jamrial at gmail.com
Tue Dec 11 04:28:18 EET 2018
On 12/10/2018 9:05 AM, Paul B Mahol wrote:
> +static uint32_t get_v(uint8_t *p)
> +{
> + uint32_t v = 0;
> +
> + do {
> + v <<= 7;
> + v += *p & 0x7f;
> + } while (*p++ & 0x80);
> +
> + return v;
> +}
More than four or so iterations will overflow uint32_t.
> +AVInputFormat ff_vividas_demuxer = {
> + .name = "vividas",
> + .long_name = NULL_IF_CONFIG_SMALL("Vividas VIV"),
> + .priv_data_size = sizeof(VividasDemuxContext),
> + .read_probe = viv_probe,
> + .read_header = viv_read_header,
> + .read_packet = viv_read_packet,
> + .read_close = viv_read_close,
> + .read_seek = viv_read_seek,
> + .flags = AVFMT_GLOBALHEADER,
Afaics, this is a muxer only flag.
More information about the ffmpeg-devel
mailing list