mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-25 09:40:37 +00:00
rtspsrc: handle NULL rtpmap and parse error better
This commit is contained in:
parent
759ea920e0
commit
d6c5fbc87c
1 changed files with 7 additions and 5 deletions
|
@ -1769,15 +1769,17 @@ gst_rtspsrc_media_to_caps (gint pt, const GstSDPMedia * media)
|
||||||
/* get and parse rtpmap */
|
/* get and parse rtpmap */
|
||||||
rtpmap = rtsp_get_attribute_for_pt (media, "rtpmap", pt);
|
rtpmap = rtsp_get_attribute_for_pt (media, "rtpmap", pt);
|
||||||
|
|
||||||
|
if (rtpmap) {
|
||||||
|
ret = gst_rtspsrc_parse_rtpmap (rtpmap, &payload, &name, &rate, ¶ms);
|
||||||
|
if (!ret) {
|
||||||
|
g_warning ("error parsing rtpmap, ignoring");
|
||||||
|
rtpmap = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
/* dynamic payloads need rtpmap or we fail */
|
/* dynamic payloads need rtpmap or we fail */
|
||||||
if (rtpmap == NULL && pt >= 96)
|
if (rtpmap == NULL && pt >= 96)
|
||||||
goto no_rtpmap;
|
goto no_rtpmap;
|
||||||
|
|
||||||
ret = gst_rtspsrc_parse_rtpmap (rtpmap, &payload, &name, &rate, ¶ms);
|
|
||||||
if (!ret) {
|
|
||||||
g_warning ("error parsing rtpmap, ignoring");
|
|
||||||
}
|
|
||||||
|
|
||||||
/* check if we have a rate, if not, we need to look up the rate from the
|
/* check if we have a rate, if not, we need to look up the rate from the
|
||||||
* default rates based on the payload types. */
|
* default rates based on the payload types. */
|
||||||
if (rate == -1) {
|
if (rate == -1) {
|
||||||
|
|
Loading…
Reference in a new issue