summaryrefslogtreecommitdiffstats
path: root/libavformat/rtsp.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavformat/rtsp.c')
-rw-r--r--libavformat/rtsp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c
index 2607fe0..e82f359 100644
--- a/libavformat/rtsp.c
+++ b/libavformat/rtsp.c
@@ -720,7 +720,7 @@ static void rtsp_skip_packet(AVFormatContext *s)
ret = url_readbuf(rt->rtsp_hd, buf, 3);
if (ret != 3)
return;
- len = (buf[1] << 8) | buf[2];
+ len = AV_RB16(buf + 1);
#ifdef DEBUG
printf("skipping RTP packet len=%d\n", len);
#endif
@@ -1098,7 +1098,7 @@ static int tcp_read_packet(AVFormatContext *s, RTSPStream **prtsp_st,
if (ret != 3)
return -1;
id = buf[0];
- len = (buf[1] << 8) | buf[2];
+ len = AV_RB16(buf + 1);
#ifdef DEBUG_RTP_TCP
printf("id=%d len=%d\n", id, len);
#endif
OpenPOWER on IntegriCloud