+static int init_satip_stream(AVFormatContext *s)
+{
+ RTSPState *rt = s->priv_data;
+ RTSPStream *rtsp_st = av_mallocz(sizeof(RTSPStream));
+ if (!rtsp_st)
+ return AVERROR(ENOMEM);
+ dynarray_add(&rt->rtsp_streams,
+ &rt->nb_rtsp_streams, rtsp_st);
+
+ rtsp_st->sdp_payload_type = 33; // MP2T
+ av_strlcpy(rtsp_st->control_url,
+ rt->control_uri, sizeof(rtsp_st->control_url));
+
+ if (rt->rtsp_flags & RTSP_FLAG_SATIP_RAW) {
+ AVStream *st = avformat_new_stream(s, NULL);
+ if (!st)
+ return AVERROR(ENOMEM);
+ st->id = rt->nb_rtsp_streams - 1;
+ rtsp_st->stream_index = st->index;
+ st->codecpar->codec_type = AVMEDIA_TYPE_DATA;
+ st->codecpar->codec_id = AV_CODEC_ID_MPEG2TS;
+ } else {
+ rtsp_st->stream_index = -1;
+ init_rtp_handler(&ff_mpegts_dynamic_handler, rtsp_st, NULL);
+ finalize_rtp_handler_init(s, rtsp_st, NULL);
+ }
+ return 0;
+}
+