| 281 | |
| 282 | #if CONFIG_RTSP_DEMUXER |
| 283 | static int init_satip_stream(AVFormatContext *s) |
| 284 | { |
| 285 | RTSPState *rt = s->priv_data; |
| 286 | RTSPStream *rtsp_st = av_mallocz(sizeof(RTSPStream)); |
| 287 | if (!rtsp_st) |
| 288 | return AVERROR(ENOMEM); |
| 289 | dynarray_add(&rt->rtsp_streams, |
| 290 | &rt->nb_rtsp_streams, rtsp_st); |
| 291 | |
| 292 | rtsp_st->sdp_payload_type = 33; // MP2T |
| 293 | av_strlcpy(rtsp_st->control_url, |
| 294 | rt->control_uri, sizeof(rtsp_st->control_url)); |
| 295 | |
| 296 | if (rt->rtsp_flags & RTSP_FLAG_SATIP_RAW) { |
| 297 | AVStream *st = avformat_new_stream(s, NULL); |
| 298 | if (!st) |
| 299 | return AVERROR(ENOMEM); |
| 300 | st->id = rt->nb_rtsp_streams - 1; |
| 301 | rtsp_st->stream_index = st->index; |
| 302 | st->codecpar->codec_type = AVMEDIA_TYPE_DATA; |
| 303 | st->codecpar->codec_id = AV_CODEC_ID_MPEG2TS; |
| 304 | } else { |
| 305 | rtsp_st->stream_index = -1; |
| 306 | init_rtp_handler(&ff_mpegts_dynamic_handler, rtsp_st, NULL); |
| 307 | finalize_rtp_handler_init(s, rtsp_st, NULL); |
| 308 | } |
| 309 | return 0; |
| 310 | } |
| 311 | #endif |
| 312 | |
| 313 | /* parse the rtpmap description: <codec_name>/<clock_rate>[/<other params>] */ |
no test coverage detected