From 5d8cae45737bed6239bd6b6e0698802dbe1463c8 Mon Sep 17 00:00:00 2001 From: Martin Storsjö Date: Mon, 23 Feb 2015 22:18:32 +0200 Subject: rtpdec: Get rid of all trivial .alloc/.free functions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Martin Storsjö --- libavformat/rtpdec_asf.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'libavformat/rtpdec_asf.c') diff --git a/libavformat/rtpdec_asf.c b/libavformat/rtpdec_asf.c index 61b14197ab..b0a50353fd 100644 --- a/libavformat/rtpdec_asf.c +++ b/libavformat/rtpdec_asf.c @@ -277,11 +277,6 @@ static int asfrtp_parse_packet(AVFormatContext *s, PayloadContext *asf, return res == 1 ? -1 : res; } -static PayloadContext *asfrtp_new_context(void) -{ - return av_mallocz(sizeof(PayloadContext)); -} - static void asfrtp_free_context(PayloadContext *asf) { if (asf->pktbuf) { @@ -299,8 +294,8 @@ RTPDynamicProtocolHandler ff_ms_rtp_ ## n ## _handler = { \ .enc_name = s, \ .codec_type = t, \ .codec_id = AV_CODEC_ID_NONE, \ + .priv_data_size = sizeof(PayloadContext), \ .parse_sdp_a_line = asfrtp_parse_sdp_line, \ - .alloc = asfrtp_new_context, \ .free = asfrtp_free_context, \ .parse_packet = asfrtp_parse_packet, \ } -- cgit v1.2.3