changeset 5619:072cb3a1d4a7 libavformat

Fix warnings about implicit function declaration when compiling rtpdec.c Patch by Alexis Ballier, alexis D ballier A gmail
author cehoyos
date Mon, 01 Feb 2010 23:10:04 +0000
parents 27fd77f20a89
children 0bbfce7dc2dc
files mpegts.c mpegts.h rtpdec.c
diffstat 3 files changed, 14 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/mpegts.c	Mon Feb 01 11:39:10 2010 +0000
+++ b/mpegts.c	Mon Feb 01 23:10:04 2010 +0000
@@ -1689,7 +1689,7 @@
 /**************************************************************/
 /* parsing functions - called from other demuxers such as RTP */
 
-MpegTSContext *mpegts_parse_open(AVFormatContext *s)
+MpegTSContext *ff_mpegts_parse_open(AVFormatContext *s)
 {
     MpegTSContext *ts;
 
@@ -1705,7 +1705,7 @@
 
 /* return the consumed length if a packet was output, or -1 if no
    packet is output */
-int mpegts_parse_packet(MpegTSContext *ts, AVPacket *pkt,
+int ff_mpegts_parse_packet(MpegTSContext *ts, AVPacket *pkt,
                         const uint8_t *buf, int len)
 {
     int len1;
@@ -1730,7 +1730,7 @@
     return len1 - len;
 }
 
-void mpegts_parse_close(MpegTSContext *ts)
+void ff_mpegts_parse_close(MpegTSContext *ts)
 {
     int i;
 
--- a/mpegts.h	Mon Feb 01 11:39:10 2010 +0000
+++ b/mpegts.h	Mon Feb 01 23:10:04 2010 +0000
@@ -56,4 +56,11 @@
 #define STREAM_TYPE_AUDIO_AC3       0x81
 #define STREAM_TYPE_AUDIO_DTS       0x8a
 
+typedef struct MpegTSContext MpegTSContext;
+
+MpegTSContext *ff_mpegts_parse_open(AVFormatContext *s);
+int ff_mpegts_parse_packet(MpegTSContext *ts, AVPacket *pkt,
+                           const uint8_t *buf, int len);
+void ff_mpegts_parse_close(MpegTSContext *ts);
+
 #endif /* AVFORMAT_MPEGTS_H */
--- a/rtpdec.c	Mon Feb 01 11:39:10 2010 +0000
+++ b/rtpdec.c	Mon Feb 01 23:10:04 2010 +0000
@@ -291,7 +291,7 @@
     s->rtp_payload_data = rtp_payload_data;
     rtp_init_statistics(&s->statistics, 0); // do we know the initial sequence from sdp?
     if (!strcmp(ff_rtp_enc_name(payload_type), "MP2T")) {
-        s->ts = mpegts_parse_open(s->ic);
+        s->ts = ff_mpegts_parse_open(s->ic);
         if (s->ts == NULL) {
             av_free(s);
             return NULL;
@@ -424,7 +424,7 @@
             // TODO: Move to a dynamic packet handler (like above)
             if (s->read_buf_index >= s->read_buf_size)
                 return -1;
-            ret = mpegts_parse_packet(s->ts, pkt, s->buf + s->read_buf_index,
+            ret = ff_mpegts_parse_packet(s->ts, pkt, s->buf + s->read_buf_index,
                                       s->read_buf_size - s->read_buf_index);
             if (ret < 0)
                 return -1;
@@ -473,7 +473,7 @@
 
     if (!st) {
         /* specific MPEG2TS demux support */
-        ret = mpegts_parse_packet(s->ts, pkt, buf, len);
+        ret = ff_mpegts_parse_packet(s->ts, pkt, buf, len);
         if (ret < 0)
             return -1;
         if (ret < len) {
@@ -560,7 +560,7 @@
 {
     // TODO: fold this into the protocol specific data fields.
     if (!strcmp(ff_rtp_enc_name(s->payload_type), "MP2T")) {
-        mpegts_parse_close(s->ts);
+        ff_mpegts_parse_close(s->ts);
     }
     av_free(s);
 }