diff rtsp.c @ 2222:3427d0c63a32 libavformat

Use AV_RB* macros where appropriate. patch by Ronald S. Bultje, rsbultje gmail com thread: Re: [FFmpeg-devel] remove int readers date: Sat, 23 Jun 2007 09:32:12 -0400
author diego
date Fri, 06 Jul 2007 09:32:34 +0000
parents fa6c59a5ab0d
children 6dade35dc9b3
line wrap: on
line diff
--- a/rtsp.c	Fri Jul 06 07:18:25 2007 +0000
+++ b/rtsp.c	Fri Jul 06 09:32:34 2007 +0000
@@ -720,7 +720,7 @@
     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 @@
     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