mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-21 10:55:51 +02:00
avformat/rtpdec_h261: Fix sanity checks
Fixes mbap and quant Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
604c4eab2b
commit
e15824e75b
@ -117,8 +117,8 @@ int ff_h261_handle_packet(AVFormatContext *ctx, PayloadContext *data,
|
|||||||
sbit = (buf[0] >> 5) & 0x07;
|
sbit = (buf[0] >> 5) & 0x07;
|
||||||
ebit = (buf[0] >> 2) & 0x07;
|
ebit = (buf[0] >> 2) & 0x07;
|
||||||
gobn = (buf[1] >> 4) & 0x0f;
|
gobn = (buf[1] >> 4) & 0x0f;
|
||||||
mbap = ((buf[1] << 1) & 0x1e) | ((buf[1] >> 7) & 0x01);
|
mbap = ((buf[1] << 1) & 0x1e) | ((buf[2] >> 7) & 0x01);
|
||||||
quant = (buf[1] >> 4) & 0x0f;
|
quant = (buf[2] >> 2) & 0x1f;
|
||||||
|
|
||||||
/* pass the H.261 payload header and continue with the actual payload */
|
/* pass the H.261 payload header and continue with the actual payload */
|
||||||
buf += RTP_H261_PAYLOAD_HEADER_SIZE;
|
buf += RTP_H261_PAYLOAD_HEADER_SIZE;
|
||||||
|
Loading…
Reference in New Issue
Block a user