]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/rtpdec_mpegts.c
mp3enc: write trailing padding
[ffmpeg] / libavformat / rtpdec_mpegts.c
index 72e11a8af24e35812e241b45f3f2a35e6ae2abb7..0fb0a0d3afdbff0a6ee696efd0f4e393c3fbb6fb 100644 (file)
@@ -30,7 +30,7 @@ struct PayloadContext {
     uint8_t buf[RTP_MAX_PACKET_LENGTH];
 };
 
-static void mpegts_free_context(PayloadContext *data)
+static void mpegts_close_context(PayloadContext *data)
 {
     if (!data)
         return;
@@ -60,9 +60,6 @@ static int mpegts_handle_packet(AVFormatContext *ctx, PayloadContext *data,
     // different ranges.
     *timestamp = RTP_NOTS_VALUE;
 
-    if (!data->ts)
-        return AVERROR(EINVAL);
-
     if (!buf) {
         if (data->read_buf_index >= data->read_buf_size)
             return AVERROR(EAGAIN);
@@ -97,6 +94,6 @@ RTPDynamicProtocolHandler ff_mpegts_dynamic_handler = {
     .priv_data_size    = sizeof(PayloadContext),
     .parse_packet      = mpegts_handle_packet,
     .init              = mpegts_init,
-    .free              = mpegts_free_context,
+    .close             = mpegts_close_context,
     .static_payload_id = 33,
 };