diff mbox series

[FFmpeg-devel,11/11] avformat/rtpdec: Make ff_rtp_handler_iterate() static

Message ID AM7PR03MB66604344EFAF4957FF874F9F8FD29@AM7PR03MB6660.eurprd03.prod.outlook.com
State Accepted
Commit 3008a93b4deb4b453d908e90a651f17af578cf0d
Headers show
Series [FFmpeg-devel,01/11] avcodec/bsf: ff_list_bsf static | expand

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished
andriy/make_ppc success Make finished
andriy/make_fate_ppc success Make fate finished

Commit Message

Andreas Rheinhardt Sept. 6, 2021, 12:43 p.m. UTC
Possible since 61974537610d82bd35b6e3ac91ccd270c6bdc711.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavformat/rtpdec.c | 15 ++++++++++++---
 libavformat/rtpdec.h | 10 ----------
 2 files changed, 12 insertions(+), 13 deletions(-)
diff mbox series

Patch

diff --git a/libavformat/rtpdec.c b/libavformat/rtpdec.c
index 6b0da9e636..20fe2b82d7 100644
--- a/libavformat/rtpdec.c
+++ b/libavformat/rtpdec.c
@@ -135,7 +135,16 @@  static const RTPDynamicProtocolHandler *const rtp_dynamic_protocol_handler_list[
     NULL,
 };
 
-const RTPDynamicProtocolHandler *ff_rtp_handler_iterate(void **opaque)
+/**
+ * Iterate over all registered rtp dynamic protocol handlers.
+ *
+ * @param opaque a pointer where libavformat will store the iteration state.
+ *               Must point to NULL to start the iteration.
+ *
+ * @return the next registered rtp dynamic protocol handler
+ *         or NULL when the iteration is finished
+ */
+static const RTPDynamicProtocolHandler *rtp_handler_iterate(void **opaque)
 {
     uintptr_t i = (uintptr_t)*opaque;
     const RTPDynamicProtocolHandler *r = rtp_dynamic_protocol_handler_list[i];
@@ -151,7 +160,7 @@  const RTPDynamicProtocolHandler *ff_rtp_handler_find_by_name(const char *name,
 {
     void *i = 0;
     const RTPDynamicProtocolHandler *handler;
-    while (handler = ff_rtp_handler_iterate(&i)) {
+    while (handler = rtp_handler_iterate(&i)) {
         if (handler->enc_name &&
             !av_strcasecmp(name, handler->enc_name) &&
             codec_type == handler->codec_type)
@@ -165,7 +174,7 @@  const RTPDynamicProtocolHandler *ff_rtp_handler_find_by_id(int id,
 {
     void *i = 0;
     const RTPDynamicProtocolHandler *handler;
-    while (handler = ff_rtp_handler_iterate(&i)) {
+    while (handler = rtp_handler_iterate(&i)) {
         if (handler->static_payload_id && handler->static_payload_id == id &&
             codec_type == handler->codec_type)
             return handler;
diff --git a/libavformat/rtpdec.h b/libavformat/rtpdec.h
index d54a05869f..5a02e72dc2 100644
--- a/libavformat/rtpdec.h
+++ b/libavformat/rtpdec.h
@@ -190,16 +190,6 @@  struct RTPDemuxContext {
     PayloadContext *dynamic_protocol_context;
 };
 
-/**
- * Iterate over all registered rtp dynamic protocol handlers.
- *
- * @param opaque a pointer where libavformat will store the iteration state. Must
- *               point to NULL to start the iteration.
- *
- * @return the next registered rtp dynamic protocol handler or NULL when the iteration is
- *         finished
- */
-const RTPDynamicProtocolHandler *ff_rtp_handler_iterate(void **opaque);
 /**
  * Find a registered rtp dynamic protocol handler with the specified name.
  *