X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavformat%2Frtpdec_mpegts.c;h=ae17f4ec0f928e95b9b031ec9e4c25e5ebe04548;hb=99c76902cdc3f815d58ba16ccfc83e75acec1f4a;hp=0c2b71745e74b0a25c45dc4ae101f5db95f73e73;hpb=880cee004418b7067605cbd9e720aabb0a617164;p=ffmpeg diff --git a/libavformat/rtpdec_mpegts.c b/libavformat/rtpdec_mpegts.c index 0c2b71745e7..ae17f4ec0f9 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,