]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/rtpdec_mpegts.c
Merge commit '5956f489d0452ff6dea6b6b81b4fa8e596fc5684'
[ffmpeg] / libavformat / rtpdec_mpegts.c
index 0c2b71745e74b0a25c45dc4ae101f5db95f73e73..ae17f4ec0f928e95b9b031ec9e4c25e5ebe04548 100644 (file)
@@ -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,