[FFmpeg-cvslog] rtpdec_h264: Make reusable functions non-static

Martin Storsjö git at videolan.org
Sat Feb 21 13:02:42 CET 2015


ffmpeg | branch: master | Martin Storsjö <martin at martin.st> | Thu Feb 19 22:18:55 2015 +0200| [0de07510844517b615ef2a2e2916f6391ad88687] | committer: Martin Storsjö

rtpdec_h264: Make reusable functions non-static

Signed-off-by: Martin Storsjö <martin at martin.st>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0de07510844517b615ef2a2e2916f6391ad88687
---

 libavformat/rtpdec_formats.h |    8 ++++++++
 libavformat/rtpdec_h264.c    |   16 ++++++++--------
 2 files changed, 16 insertions(+), 8 deletions(-)

diff --git a/libavformat/rtpdec_formats.h b/libavformat/rtpdec_formats.h
index 0c9f49c..47b89e8 100644
--- a/libavformat/rtpdec_formats.h
+++ b/libavformat/rtpdec_formats.h
@@ -35,6 +35,14 @@ int ff_h263_handle_packet(AVFormatContext *ctx, PayloadContext *data,
                           AVStream *st, AVPacket *pkt, uint32_t *timestamp,
                           const uint8_t *buf, int len, uint16_t seq, int flags);
 
+int ff_h264_parse_sprop_parameter_sets(AVFormatContext *s,
+                                       uint8_t **data_ptr, int *size_ptr,
+                                       const char *value);
+int ff_h264_handle_aggregated_packet(AVFormatContext *ctx, AVPacket *pkt,
+                                     const uint8_t *buf, int len,
+                                     int start_skip, int *nal_counters,
+                                     int nal_mask);
+
 extern RTPDynamicProtocolHandler ff_amr_nb_dynamic_handler;
 extern RTPDynamicProtocolHandler ff_amr_wb_dynamic_handler;
 extern RTPDynamicProtocolHandler ff_g726_16_dynamic_handler;
diff --git a/libavformat/rtpdec_h264.c b/libavformat/rtpdec_h264.c
index f8167a9..e781b36 100644
--- a/libavformat/rtpdec_h264.c
+++ b/libavformat/rtpdec_h264.c
@@ -95,9 +95,9 @@ static void parse_profile_level_id(AVFormatContext *s,
     h264_data->level_idc   = level_idc;
 }
 
-static int parse_sprop_parameter_sets(AVFormatContext *s,
-                                      uint8_t **data_ptr, int *size_ptr,
-                                      const char *value)
+int ff_h264_parse_sprop_parameter_sets(AVFormatContext *s,
+                                       uint8_t **data_ptr, int *size_ptr,
+                                       const char *value)
 {
     char base64packet[1024];
     uint8_t decoded_packet[1024];
@@ -170,8 +170,8 @@ static int sdp_parse_fmtp_config_h264(AVFormatContext *s,
         int ret;
         codec->extradata_size = 0;
         av_freep(&codec->extradata);
-        ret = parse_sprop_parameter_sets(s, &codec->extradata,
-                                         &codec->extradata_size, value);
+        ret = ff_h264_parse_sprop_parameter_sets(s, &codec->extradata,
+                                                 &codec->extradata_size, value);
         av_log(s, AV_LOG_DEBUG, "Extradata set to %p (size: %d)\n",
                codec->extradata, codec->extradata_size);
         return ret;
@@ -179,7 +179,7 @@ static int sdp_parse_fmtp_config_h264(AVFormatContext *s,
     return 0;
 }
 
-static int h264_handle_packet_stap_a(AVFormatContext *ctx, AVPacket *pkt,
+int ff_h264_handle_aggregated_packet(AVFormatContext *ctx, AVPacket *pkt,
                                      const uint8_t *buf, int len,
                                      int start_skip, int *nal_counters,
                                      int nal_mask)
@@ -315,8 +315,8 @@ static int h264_handle_packet(AVFormatContext *ctx, PayloadContext *data,
         // consume the STAP-A NAL
         buf++;
         len--;
-        result = h264_handle_packet_stap_a(ctx, pkt, buf, len, 0,
-                                           NAL_COUNTERS, NAL_MASK);
+        result = ff_h264_handle_aggregated_packet(ctx, pkt, buf, len, 0,
+                                                  NAL_COUNTERS, NAL_MASK);
         break;
 
     case 25:                   // STAP-B



More information about the ffmpeg-cvslog mailing list