diff options
Diffstat (limited to 'stream')
-rw-r--r-- | stream/freesdp/parser.c | 2 | ||||
-rw-r--r-- | stream/librtsp/rtsp_rtp.c | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/stream/freesdp/parser.c b/stream/freesdp/parser.c index c17041b7ba..bf6f985e94 100644 --- a/stream/freesdp/parser.c +++ b/stream/freesdp/parser.c @@ -1644,7 +1644,7 @@ const char * fsdp_get_media_format (const fsdp_media_description_t * dsc, unsigned int index) { - if (!dsc || (index < dsc->formats_count)) + if (!dsc || (index < dsc->formats_count - 1)) return NULL; return dsc->formats[index]; } diff --git a/stream/librtsp/rtsp_rtp.c b/stream/librtsp/rtsp_rtp.c index 0c00e5b454..66c7be4a36 100644 --- a/stream/librtsp/rtsp_rtp.c +++ b/stream/librtsp/rtsp_rtp.c @@ -507,7 +507,8 @@ rtp_setup_and_play (rtsp_t *rtsp_session) } /* only MPEG-TS is supported at the moment */ - if (!strstr (fsdp_get_media_format (med_dsc, 0), + if (!fsdp_get_media_format (med_dsc, 0) || + !strstr (fsdp_get_media_format (med_dsc, 0), RTSP_MEDIA_CONTAINER_MPEG_TS)) { fsdp_description_delete (dsc); |