History

avformat/rtpdec: Make ff_rtp_handler_iterate() static

Possible since 61974537610d82bd35b6e3ac91ccd270c6bdc711.

Andreas Rheinhardt committed 5 years ago

Commit 3008a931 parent cd3d7b02 files · +12 −13Browse files

Unified · Split

2 files
  1. libavformat/rtpdec.c +12 −3
  2. libavformat/rtpdec.h +0 −10
libavformat/rtpdec.c+12−3
@@ -135,7 +135,16 @@ static const RTPDynamicProtocolHandler *const rtp_dynamic_protocol_handler_list[ · 134 unmodified lines
135135 NULL,
136136 };
137137
138−const RTPDynamicProtocolHandler *ff_rtp_handler_iterate(void **opaque)
138+/**
139+ * Iterate over all registered rtp dynamic protocol handlers.
140+ *
141+ * @param opaque a pointer where libavformat will store the iteration state.
142+ * Must point to NULL to start the iteration.
143+ *
144+ * @return the next registered rtp dynamic protocol handler
145+ * or NULL when the iteration is finished
146+ */
147+static const RTPDynamicProtocolHandler *rtp_handler_iterate(void **opaque)
139148 {
140149 uintptr_t i = (uintptr_t)*opaque;
141150 const RTPDynamicProtocolHandler *r = rtp_dynamic_protocol_handler_list[i];
@@ -151,7 +160,7 @@ const RTPDynamicProtocolHandler *ff_rtp_handler_find_by_name(const char *name, · 9 unmodified lines
151160 {
152161 void *i = 0;
153162 const RTPDynamicProtocolHandler *handler;
154− while (handler = ff_rtp_handler_iterate(&i)) {
163+ while (handler = rtp_handler_iterate(&i)) {
155164 if (handler->enc_name &&
156165 !av_strcasecmp(name, handler->enc_name) &&
157166 codec_type == handler->codec_type)
@@ -165,7 +174,7 @@ const RTPDynamicProtocolHandler *ff_rtp_handler_find_by_id(int id, · 7 unmodified lines
165174 {
166175 void *i = 0;
167176 const RTPDynamicProtocolHandler *handler;
168− while (handler = ff_rtp_handler_iterate(&i)) {
177+ while (handler = rtp_handler_iterate(&i)) {
169178 if (handler->static_payload_id && handler->static_payload_id == id &&
170179 codec_type == handler->codec_type)
171180 return handler;
libavformat/rtpdec.h+0−10
@@ -190,16 +190,6 @@ struct RTPDemuxContext { · 189 unmodified lines
190190 PayloadContext *dynamic_protocol_context;
191191 };
192192
193−/**
194− * Iterate over all registered rtp dynamic protocol handlers.
195− *
196− * @param opaque a pointer where libavformat will store the iteration state. Must
197− * point to NULL to start the iteration.
198− *
199− * @return the next registered rtp dynamic protocol handler or NULL when the iteration is
200− * finished
201− */
202−const RTPDynamicProtocolHandler *ff_rtp_handler_iterate(void **opaque);
203193 /**
204194 * Find a registered rtp dynamic protocol handler with the specified name.
205195 *

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t