aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-02-25 00:58:35 +0100
committerMichael Niedermayer <michaelni@gmx.at>2015-02-25 00:58:39 +0100
commit3130e5be92858b9a15622965cacc9fe59f5336c2 (patch)
tree28d727a541c482d942304d80162b537fcab2580a
parent7f03f75ce72fe1c6adfc63f621eeb69cde13769a (diff)
parentd594dbecce5f3af7f80bbf5bb1b516d740b69ccd (diff)
downloadandroid_external_ffmpeg-3130e5be92858b9a15622965cacc9fe59f5336c2.tar.gz
android_external_ffmpeg-3130e5be92858b9a15622965cacc9fe59f5336c2.tar.bz2
android_external_ffmpeg-3130e5be92858b9a15622965cacc9fe59f5336c2.zip
Merge commit 'd594dbecce5f3af7f80bbf5bb1b516d740b69ccd'
* commit 'd594dbecce5f3af7f80bbf5bb1b516d740b69ccd': rtpdec: Rename the free method to close Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavformat/rdt.c4
-rw-r--r--libavformat/rtpdec.h2
-rw-r--r--libavformat/rtpdec_ac3.c4
-rw-r--r--libavformat/rtpdec_asf.c4
-rw-r--r--libavformat/rtpdec_dv.c4
-rw-r--r--libavformat/rtpdec_h261.c4
-rw-r--r--libavformat/rtpdec_h263_rfc2190.c4
-rw-r--r--libavformat/rtpdec_h264.c4
-rw-r--r--libavformat/rtpdec_jpeg.c4
-rw-r--r--libavformat/rtpdec_latm.c4
-rw-r--r--libavformat/rtpdec_mpa_robust.c4
-rw-r--r--libavformat/rtpdec_mpeg4.c4
-rw-r--r--libavformat/rtpdec_mpegts.c4
-rw-r--r--libavformat/rtpdec_qt.c4
-rw-r--r--libavformat/rtpdec_svq3.c4
-rw-r--r--libavformat/rtpdec_vp8.c4
-rw-r--r--libavformat/rtpdec_xiph.c6
-rw-r--r--libavformat/rtsp.c8
18 files changed, 38 insertions, 38 deletions
diff --git a/libavformat/rdt.c b/libavformat/rdt.c
index 27c5f9e669..737794b6a9 100644
--- a/libavformat/rdt.c
+++ b/libavformat/rdt.c
@@ -538,7 +538,7 @@ static av_cold int rdt_init(AVFormatContext *s, int st_index, PayloadContext *rd
}
static void
-rdt_free_context (PayloadContext *rdt)
+rdt_close_context (PayloadContext *rdt)
{
int i;
@@ -561,7 +561,7 @@ static RTPDynamicProtocolHandler rdt_ ## n ## _handler = { \
.priv_data_size = sizeof(PayloadContext), \
.init = rdt_init, \
.parse_sdp_a_line = rdt_parse_sdp_line, \
- .free = rdt_free_context, \
+ .close = rdt_close_context, \
.parse_packet = rdt_parse_packet \
}
diff --git a/libavformat/rtpdec.h b/libavformat/rtpdec.h
index 356449aefa..96cbb5e5ac 100644
--- a/libavformat/rtpdec.h
+++ b/libavformat/rtpdec.h
@@ -130,7 +130,7 @@ struct RTPDynamicProtocolHandler {
/** Free any data needed by the rtp parsing for this dynamic data.
* Don't free the protocol_data pointer itself, that is freed by the
* caller. This is called even if the init method failed. */
- void (*free)(PayloadContext *protocol_data);
+ void (*close)(PayloadContext *protocol_data);
/** Parse handler for this dynamic packet */
DynamicPayloadPacketHandlerProc parse_packet;
int (*need_keyframe)(PayloadContext *context);
diff --git a/libavformat/rtpdec_ac3.c b/libavformat/rtpdec_ac3.c
index 6fc9a68239..48b2d9cf98 100644
--- a/libavformat/rtpdec_ac3.c
+++ b/libavformat/rtpdec_ac3.c
@@ -32,7 +32,7 @@ struct PayloadContext {
AVIOContext *fragment;
};
-static void ac3_free_context(PayloadContext *data)
+static void ac3_close_context(PayloadContext *data)
{
ffio_free_dyn_buf(&data->fragment);
}
@@ -128,6 +128,6 @@ RTPDynamicProtocolHandler ff_ac3_dynamic_handler = {
.codec_id = AV_CODEC_ID_AC3,
.need_parsing = AVSTREAM_PARSE_FULL,
.priv_data_size = sizeof(PayloadContext),
- .free = ac3_free_context,
+ .close = ac3_close_context,
.parse_packet = ac3_handle_packet,
};
diff --git a/libavformat/rtpdec_asf.c b/libavformat/rtpdec_asf.c
index 5b5a8da58b..019123e559 100644
--- a/libavformat/rtpdec_asf.c
+++ b/libavformat/rtpdec_asf.c
@@ -285,7 +285,7 @@ static int asfrtp_parse_packet(AVFormatContext *s, PayloadContext *asf,
return res == 1 ? -1 : res;
}
-static void asfrtp_free_context(PayloadContext *asf)
+static void asfrtp_close_context(PayloadContext *asf)
{
ffio_free_dyn_buf(&asf->pktbuf);
av_freep(&asf->buf);
@@ -299,7 +299,7 @@ RTPDynamicProtocolHandler ff_ms_rtp_ ## n ## _handler = { \
.codec_id = AV_CODEC_ID_NONE, \
.priv_data_size = sizeof(PayloadContext), \
.parse_sdp_a_line = asfrtp_parse_sdp_line, \
- .free = asfrtp_free_context, \
+ .close = asfrtp_close_context, \
.parse_packet = asfrtp_parse_packet, \
}
diff --git a/libavformat/rtpdec_dv.c b/libavformat/rtpdec_dv.c
index 43cd3cdeac..de99d27795 100644
--- a/libavformat/rtpdec_dv.c
+++ b/libavformat/rtpdec_dv.c
@@ -32,7 +32,7 @@ struct PayloadContext {
int bundled_audio;
};
-static av_cold void dv_free_context(PayloadContext *data)
+static av_cold void dv_close_context(PayloadContext *data)
{
ffio_free_dyn_buf(&data->buf);
}
@@ -138,6 +138,6 @@ RTPDynamicProtocolHandler ff_dv_dynamic_handler = {
.need_parsing = AVSTREAM_PARSE_FULL,
.parse_sdp_a_line = dv_parse_sdp_line,
.priv_data_size = sizeof(PayloadContext),
- .free = dv_free_context,
+ .close = dv_close_context,
.parse_packet = dv_handle_packet,
};
diff --git a/libavformat/rtpdec_h261.c b/libavformat/rtpdec_h261.c
index 787f1d0dd8..9729f21d15 100644
--- a/libavformat/rtpdec_h261.c
+++ b/libavformat/rtpdec_h261.c
@@ -33,7 +33,7 @@ struct PayloadContext {
uint32_t timestamp;
};
-static av_cold void h261_free_context(PayloadContext *pl_ctx)
+static av_cold void h261_close_context(PayloadContext *pl_ctx)
{
/* return if context is invalid */
if (!pl_ctx)
@@ -168,7 +168,7 @@ RTPDynamicProtocolHandler ff_h261_dynamic_handler = {
.codec_id = AV_CODEC_ID_H261,
.need_parsing = AVSTREAM_PARSE_FULL,
.priv_data_size = sizeof(PayloadContext),
- .free = h261_free_context,
+ .close = h261_close_context,
.parse_packet = h261_handle_packet,
.static_payload_id = 31,
};
diff --git a/libavformat/rtpdec_h263_rfc2190.c b/libavformat/rtpdec_h263_rfc2190.c
index dab4d625a8..33712e7b76 100644
--- a/libavformat/rtpdec_h263_rfc2190.c
+++ b/libavformat/rtpdec_h263_rfc2190.c
@@ -40,7 +40,7 @@ struct PayloadContext {
int newformat;
};
-static void h263_free_context(PayloadContext *data)
+static void h263_close_context(PayloadContext *data)
{
ffio_free_dyn_buf(&data->buf);
}
@@ -189,6 +189,6 @@ RTPDynamicProtocolHandler ff_h263_rfc2190_dynamic_handler = {
.need_parsing = AVSTREAM_PARSE_FULL,
.parse_packet = h263_handle_packet,
.priv_data_size = sizeof(PayloadContext),
- .free = h263_free_context,
+ .close = h263_close_context,
.static_payload_id = 34,
};
diff --git a/libavformat/rtpdec_h264.c b/libavformat/rtpdec_h264.c
index 64ecde11c0..2ac79dbf5e 100644
--- a/libavformat/rtpdec_h264.c
+++ b/libavformat/rtpdec_h264.c
@@ -371,7 +371,7 @@ static int h264_handle_packet(AVFormatContext *ctx, PayloadContext *data,
return result;
}
-static void h264_free_context(PayloadContext *data)
+static void h264_close_context(PayloadContext *data)
{
#ifdef DEBUG
int ii;
@@ -413,6 +413,6 @@ RTPDynamicProtocolHandler ff_h264_dynamic_handler = {
.need_parsing = AVSTREAM_PARSE_FULL,
.priv_data_size = sizeof(PayloadContext),
.parse_sdp_a_line = parse_h264_sdp_line,
- .free = h264_free_context,
+ .close = h264_close_context,
.parse_packet = h264_handle_packet,
};
diff --git a/libavformat/rtpdec_jpeg.c b/libavformat/rtpdec_jpeg.c
index ca4debef99..2028053536 100644
--- a/libavformat/rtpdec_jpeg.c
+++ b/libavformat/rtpdec_jpeg.c
@@ -60,7 +60,7 @@ static const uint8_t default_quantizers[128] = {
99, 99, 99, 99, 99, 99, 99, 99
};
-static void jpeg_free_context(PayloadContext *jpeg)
+static void jpeg_close_context(PayloadContext *jpeg)
{
ffio_free_dyn_buf(&jpeg->frame);
}
@@ -388,7 +388,7 @@ RTPDynamicProtocolHandler ff_jpeg_dynamic_handler = {
.codec_type = AVMEDIA_TYPE_VIDEO,
.codec_id = AV_CODEC_ID_MJPEG,
.priv_data_size = sizeof(PayloadContext),
- .free = jpeg_free_context,
+ .close = jpeg_close_context,
.parse_packet = jpeg_parse_packet,
.static_payload_id = 26,
};
diff --git a/libavformat/rtpdec_latm.c b/libavformat/rtpdec_latm.c
index ab425bc080..7db92f60fa 100644
--- a/libavformat/rtpdec_latm.c
+++ b/libavformat/rtpdec_latm.c
@@ -32,7 +32,7 @@ struct PayloadContext {
uint32_t timestamp;
};
-static void latm_free_context(PayloadContext *data)
+static void latm_close_context(PayloadContext *data)
{
ffio_free_dyn_buf(&data->dyn_buf);
av_freep(&data->buf);
@@ -168,6 +168,6 @@ RTPDynamicProtocolHandler ff_mp4a_latm_dynamic_handler = {
.codec_id = AV_CODEC_ID_AAC,
.priv_data_size = sizeof(PayloadContext),
.parse_sdp_a_line = latm_parse_sdp_line,
- .free = latm_free_context,
+ .close = latm_close_context,
.parse_packet = latm_parse_packet,
};
diff --git a/libavformat/rtpdec_mpa_robust.c b/libavformat/rtpdec_mpa_robust.c
index 2c3dc0c742..776e245e25 100644
--- a/libavformat/rtpdec_mpa_robust.c
+++ b/libavformat/rtpdec_mpa_robust.c
@@ -34,7 +34,7 @@ struct PayloadContext {
AVIOContext *fragment;
};
-static void mpa_robust_free_context(PayloadContext *data)
+static void mpa_robust_close_context(PayloadContext *data)
{
ffio_free_dyn_buf(&data->fragment);
av_free(data->split_buf);
@@ -195,6 +195,6 @@ RTPDynamicProtocolHandler ff_mpeg_audio_robust_dynamic_handler = {
.codec_id = AV_CODEC_ID_MP3ADU,
.need_parsing = AVSTREAM_PARSE_HEADERS,
.priv_data_size = sizeof(PayloadContext),
- .free = mpa_robust_free_context,
+ .close = mpa_robust_close_context,
.parse_packet = mpa_robust_parse_packet,
};
diff --git a/libavformat/rtpdec_mpeg4.c b/libavformat/rtpdec_mpeg4.c
index 23b5dc8b0e..70e51f862c 100644
--- a/libavformat/rtpdec_mpeg4.c
+++ b/libavformat/rtpdec_mpeg4.c
@@ -91,7 +91,7 @@ static const AttrNameMap attr_names[] = {
{ NULL, -1, -1 },
};
-static void free_context(PayloadContext *data)
+static void close_context(PayloadContext *data)
{
av_freep(&data->au_headers);
av_freep(&data->mode);
@@ -329,6 +329,6 @@ RTPDynamicProtocolHandler ff_mpeg4_generic_dynamic_handler = {
.codec_id = AV_CODEC_ID_AAC,
.priv_data_size = sizeof(PayloadContext),
.parse_sdp_a_line = parse_sdp_line,
- .free = free_context,
+ .close = close_context,
.parse_packet = aac_parse_packet,
};
diff --git a/libavformat/rtpdec_mpegts.c b/libavformat/rtpdec_mpegts.c
index 6b9c6768dd..5bf0f186db 100644
--- a/libavformat/rtpdec_mpegts.c
+++ b/libavformat/rtpdec_mpegts.c
@@ -30,7 +30,7 @@ struct PayloadContext {
uint8_t buf[RTP_MAX_PACKET_LENGTH];
};
-static void mpegts_free_context(PayloadContext *data)
+static void mpegts_close_context(PayloadContext *data)
{
if (!data)
return;
@@ -94,6 +94,6 @@ RTPDynamicProtocolHandler ff_mpegts_dynamic_handler = {
.priv_data_size = sizeof(PayloadContext),
.parse_packet = mpegts_handle_packet,
.init = mpegts_init,
- .free = mpegts_free_context,
+ .close = mpegts_close_context,
.static_payload_id = 33,
};
diff --git a/libavformat/rtpdec_qt.c b/libavformat/rtpdec_qt.c
index 2a4a08f960..a5f1480db6 100644
--- a/libavformat/rtpdec_qt.c
+++ b/libavformat/rtpdec_qt.c
@@ -235,7 +235,7 @@ static int qt_rtp_parse_packet(AVFormatContext *s, PayloadContext *qt,
}
}
-static void qt_rtp_free(PayloadContext *qt)
+static void qt_rtp_close(PayloadContext *qt)
{
av_freep(&qt->pkt.data);
}
@@ -246,7 +246,7 @@ RTPDynamicProtocolHandler ff_ ## m ## _rtp_ ## n ## _handler = { \
.codec_type = t, \
.codec_id = AV_CODEC_ID_NONE, \
.priv_data_size = sizeof(PayloadContext), \
- .free = qt_rtp_free, \
+ .close = qt_rtp_close, \
.parse_packet = qt_rtp_parse_packet, \
}
diff --git a/libavformat/rtpdec_svq3.c b/libavformat/rtpdec_svq3.c
index 18026a74ee..bad199fef3 100644
--- a/libavformat/rtpdec_svq3.c
+++ b/libavformat/rtpdec_svq3.c
@@ -105,7 +105,7 @@ static int svq3_parse_packet (AVFormatContext *s, PayloadContext *sv,
return AVERROR(EAGAIN);
}
-static void svq3_extradata_free(PayloadContext *sv)
+static void svq3_close_context(PayloadContext *sv)
{
ffio_free_dyn_buf(&sv->pktbuf);
}
@@ -115,6 +115,6 @@ RTPDynamicProtocolHandler ff_svq3_dynamic_handler = {
.codec_type = AVMEDIA_TYPE_VIDEO,
.codec_id = AV_CODEC_ID_NONE, // see if (config_packet) above
.priv_data_size = sizeof(PayloadContext),
- .free = svq3_extradata_free,
+ .close = svq3_close_context,
.parse_packet = svq3_parse_packet,
};
diff --git a/libavformat/rtpdec_vp8.c b/libavformat/rtpdec_vp8.c
index 2f4a40e852..d1e355d3da 100644
--- a/libavformat/rtpdec_vp8.c
+++ b/libavformat/rtpdec_vp8.c
@@ -266,7 +266,7 @@ static av_cold int vp8_init(AVFormatContext *s, int st_index, PayloadContext *vp
return 0;
}
-static void vp8_free_context(PayloadContext *vp8)
+static void vp8_close_context(PayloadContext *vp8)
{
ffio_free_dyn_buf(&vp8->data);
}
@@ -282,7 +282,7 @@ RTPDynamicProtocolHandler ff_vp8_dynamic_handler = {
.codec_id = AV_CODEC_ID_VP8,
.priv_data_size = sizeof(PayloadContext),
.init = vp8_init,
- .free = vp8_free_context,
+ .close = vp8_close_context,
.parse_packet = vp8_handle_packet,
.need_keyframe = vp8_need_keyframe,
};
diff --git a/libavformat/rtpdec_xiph.c b/libavformat/rtpdec_xiph.c
index abdbcf4a86..a09653f340 100644
--- a/libavformat/rtpdec_xiph.c
+++ b/libavformat/rtpdec_xiph.c
@@ -50,7 +50,7 @@ struct PayloadContext {
int split_pkts;
};
-static void xiph_free_context(PayloadContext * data)
+static void xiph_close_context(PayloadContext * data)
{
ffio_free_dyn_buf(&data->fragment);
av_freep(&data->split_buf);
@@ -372,7 +372,7 @@ RTPDynamicProtocolHandler ff_theora_dynamic_handler = {
.codec_id = AV_CODEC_ID_THEORA,
.priv_data_size = sizeof(PayloadContext),
.parse_sdp_a_line = xiph_parse_sdp_line,
- .free = xiph_free_context,
+ .close = xiph_close_context,
.parse_packet = xiph_handle_packet,
};
@@ -383,6 +383,6 @@ RTPDynamicProtocolHandler ff_vorbis_dynamic_handler = {
.need_parsing = AVSTREAM_PARSE_HEADERS,
.priv_data_size = sizeof(PayloadContext),
.parse_sdp_a_line = xiph_parse_sdp_line,
- .free = xiph_free_context,
+ .close = xiph_close_context,
.parse_packet = xiph_handle_packet,
};
diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c
index 529e34b297..05f4171d51 100644
--- a/libavformat/rtsp.c
+++ b/libavformat/rtsp.c
@@ -206,8 +206,8 @@ static void finalize_rtp_handler_init(AVFormatContext *s, RTSPStream *rtsp_st,
rtsp_st->dynamic_protocol_context);
if (ret < 0) {
if (rtsp_st->dynamic_protocol_context) {
- if (rtsp_st->dynamic_handler->free)
- rtsp_st->dynamic_handler->free(
+ if (rtsp_st->dynamic_handler->close)
+ rtsp_st->dynamic_handler->close(
rtsp_st->dynamic_protocol_context);
av_free(rtsp_st->dynamic_protocol_context);
}
@@ -741,8 +741,8 @@ void ff_rtsp_close_streams(AVFormatContext *s)
rtsp_st = rt->rtsp_streams[i];
if (rtsp_st) {
if (rtsp_st->dynamic_handler && rtsp_st->dynamic_protocol_context) {
- if (rtsp_st->dynamic_handler->free)
- rtsp_st->dynamic_handler->free(
+ if (rtsp_st->dynamic_handler->close)
+ rtsp_st->dynamic_handler->close(
rtsp_st->dynamic_protocol_context);
av_free(rtsp_st->dynamic_protocol_context);
}