summaryrefslogtreecommitdiff
path: root/libavformat/rtpdec_xiph.c
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2015-02-23 22:18:32 +0200
committerMartin Storsjö <martin@martin.st>2015-02-24 16:24:19 +0200
commit5d8cae45737bed6239bd6b6e0698802dbe1463c8 (patch)
treed7f5c2316c6d71136cde6d31da2bd2f491362560 /libavformat/rtpdec_xiph.c
parente72605f80bf5cbe32053a554ccc137e0a99cf3dd (diff)
downloadffmpeg-5d8cae45737bed6239bd6b6e0698802dbe1463c8.tar.gz
rtpdec: Get rid of all trivial .alloc/.free functions
Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavformat/rtpdec_xiph.c')
-rw-r--r--libavformat/rtpdec_xiph.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/libavformat/rtpdec_xiph.c b/libavformat/rtpdec_xiph.c
index ce3d591d21..d7a08bca4d 100644
--- a/libavformat/rtpdec_xiph.c
+++ b/libavformat/rtpdec_xiph.c
@@ -49,11 +49,6 @@ struct PayloadContext {
int split_pkts;
};
-static PayloadContext *xiph_new_context(void)
-{
- return av_mallocz(sizeof(PayloadContext));
-}
-
static inline void free_fragment(PayloadContext * data)
{
if (data->fragment) {
@@ -385,8 +380,8 @@ RTPDynamicProtocolHandler ff_theora_dynamic_handler = {
.enc_name = "theora",
.codec_type = AVMEDIA_TYPE_VIDEO,
.codec_id = AV_CODEC_ID_THEORA,
+ .priv_data_size = sizeof(PayloadContext),
.parse_sdp_a_line = xiph_parse_sdp_line,
- .alloc = xiph_new_context,
.free = xiph_free_context,
.parse_packet = xiph_handle_packet,
};
@@ -396,8 +391,8 @@ RTPDynamicProtocolHandler ff_vorbis_dynamic_handler = {
.codec_type = AVMEDIA_TYPE_AUDIO,
.codec_id = AV_CODEC_ID_VORBIS,
.need_parsing = AVSTREAM_PARSE_HEADERS,
+ .priv_data_size = sizeof(PayloadContext),
.parse_sdp_a_line = xiph_parse_sdp_line,
- .alloc = xiph_new_context,
.free = xiph_free_context,
.parse_packet = xiph_handle_packet,
};