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_ac3.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'libavformat/rtpdec_ac3.c') diff --git a/libavformat/rtpdec_ac3.c b/libavformat/rtpdec_ac3.c index 1b04a0b263..4a793d48d3 100644 --- a/libavformat/rtpdec_ac3.c +++ b/libavformat/rtpdec_ac3.c @@ -31,11 +31,6 @@ struct PayloadContext { AVIOContext *fragment; }; -static PayloadContext *ac3_new_context(void) -{ - return av_mallocz(sizeof(PayloadContext)); -} - static void free_fragment(PayloadContext *data) { if (data->fragment) { @@ -142,7 +137,7 @@ RTPDynamicProtocolHandler ff_ac3_dynamic_handler = { .codec_type = AVMEDIA_TYPE_AUDIO, .codec_id = AV_CODEC_ID_AC3, .need_parsing = AVSTREAM_PARSE_FULL, - .alloc = ac3_new_context, + .priv_data_size = sizeof(PayloadContext), .free = ac3_free_context, .parse_packet = ac3_handle_packet, }; -- cgit v1.2.3