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_mpegts.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'libavformat/rtpdec_mpegts.c') diff --git a/libavformat/rtpdec_mpegts.c b/libavformat/rtpdec_mpegts.c index b3ef261336..5ef17cbdf1 100644 --- a/libavformat/rtpdec_mpegts.c +++ b/libavformat/rtpdec_mpegts.c @@ -30,11 +30,6 @@ struct PayloadContext { uint8_t buf[RTP_MAX_PACKET_LENGTH]; }; -static PayloadContext *mpegts_new_context(void) -{ - return av_mallocz(sizeof(PayloadContext)); -} - static void mpegts_free_context(PayloadContext *data) { if (!data) @@ -100,8 +95,8 @@ static int mpegts_handle_packet(AVFormatContext *ctx, PayloadContext *data, RTPDynamicProtocolHandler ff_mpegts_dynamic_handler = { .codec_type = AVMEDIA_TYPE_DATA, + .priv_data_size = sizeof(PayloadContext), .parse_packet = mpegts_handle_packet, - .alloc = mpegts_new_context, .init = mpegts_init, .free = mpegts_free_context, .static_payload_id = 33, -- cgit v1.2.3