[vlc-devel] [PATCH] Added FBS demux
Francois Cartegnie
fcvlcdev at free.fr
Fri Jun 28 09:50:53 CEST 2019
Le 28/06/2019 à 01:13, bkurniawan at orecx.com a écrit :
> + p_sys->framesPerSecond = 5;
> + p_sys->timestamp = 0;
> + p_sys->seeking = false;
> + int readBytes = vlc_stream_Peek(p_demux->s, &p_peek, 2000);
> + if (readBytes == -1) {
> + return VLC_EGENERIC;
> + }
> + if (memcmp((char*) p_peek, "FBS 001.000", 11)) {
> + return VLC_EGENERIC; // file invalid
> + }
> +
> + uint64_t pos = 12;
> + for (uint8_t frameNo = 1; frameNo < 6; frameNo++) {
> + uint32_t dataLength = U32_AT(&p_peek[pos]);
> + uint32_t paddedDataLength = 4 * ((dataLength + 3) / 4);
> + if (frameNo == 1) {
> + p_sys->rfbVersion = p_peek[pos + 14] - 48; // rfbVersion is either 3 or 8
> + }
Hi,
Starts directly with out of bounds reads, and seems that's the same
everywhere...
--
Francois Cartegnie
VideoLAN - VLC Developer
More information about the vlc-devel
mailing list