]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/rtp_h264.c
remove code_prefix variable, no speed change
[ffmpeg] / libavformat / rtp_h264.c
index 2568e9ea57ffd5e3952c7fb693d512ed76660dc2..0ae6aa664d924ee3f1c4b68ca79cfb965d154630 100644 (file)
 #include "bitstream.h"
 
 #include <unistd.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
+#include "network.h"
 #include <assert.h>
-#ifndef __BEOS__
-# include <arpa/inet.h>
-#else
-# include "barpainet.h"
-#endif
-#include <netdb.h>
 
 #include "rtp_internal.h"
 #include "rtp_h264.h"
@@ -172,7 +164,9 @@ static int h264_handle_packet(RTPDemuxContext * s,
                               const uint8_t * buf,
                               int len)
 {
-//    h264_rtp_extra_data *data = s->dynamic_protocol_context;
+#ifdef DEBUG
+    h264_rtp_extra_data *data = s->dynamic_protocol_context;
+#endif
     uint8_t nal = buf[0];
     uint8_t type = (nal & 0x1f);
     int result= 0;
@@ -213,7 +207,7 @@ static int h264_handle_packet(RTPDemuxContext * s,
                 int src_len= len;
 
                 do {
-                    uint16_t nal_size = BE_16(src); // this going to be a problem if unaligned (can it be?)
+                    uint16_t nal_size = AV_RB16(src); // this going to be a problem if unaligned (can it be?)
 
                     // consume the length of the aggregate...
                     src += 2;
@@ -318,7 +312,7 @@ static int h264_handle_packet(RTPDemuxContext * s,
 }
 
 /* ---------------- public code */
-static void *h264_new_extradata()
+static void *h264_new_extradata(void)
 {
     h264_rtp_extra_data *data =
         av_mallocz(sizeof(h264_rtp_extra_data) +