]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/rtpdec_h261.c
Merge commit '4c2fd4b262347273afe97865ba451a1abde43ae6'
[ffmpeg] / libavformat / rtpdec_h261.c
index c1d79a8ace7aaf2ff5869f3a42f2c8430eee1526..b902d2aa4082c60a435ffe0fcb6c36da94191ec5 100644 (file)
@@ -117,8 +117,8 @@ int ff_h261_handle_packet(AVFormatContext *ctx, PayloadContext *data,
     sbit  =  (buf[0] >> 5) & 0x07;
     ebit  =  (buf[0] >> 2) & 0x07;
     gobn  =  (buf[1] >> 4) & 0x0f;
-    mbap  = ((buf[1] << 1) & 0x1e) | ((buf[1] >> 7) & 0x01);
-    quant =  (buf[1] >> 4) & 0x0f;
+    mbap  = ((buf[1] << 1) & 0x1e) | ((buf[2] >> 7) & 0x01);
+    quant =  (buf[2] >> 2) & 0x1f;
 
     /* pass the H.261 payload header and continue with the actual payload */
     buf += RTP_H261_PAYLOAD_HEADER_SIZE;