projects
/
platform
/
upstream
/
gstreamer.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f8eef0a
)
sdpdemux: check if connections are available on media entry before get
author
Thiago Santos
<thiago@mode.net>
Sat, 1 Feb 2020 01:25:08 +0000
(17:25 -0800)
committer
Thiago Sousa Santos
<thiagossantos@gmail.com>
Sun, 2 Feb 2020 22:15:40 +0000
(22:15 +0000)
Otherwise we trigger an assert.
gst/sdp/gstsdpdemux.c
patch
|
blob
|
history
diff --git
a/gst/sdp/gstsdpdemux.c
b/gst/sdp/gstsdpdemux.c
index
4fc316d
..
98aebdf
100644
(file)
--- a/
gst/sdp/gstsdpdemux.c
+++ b/
gst/sdp/gstsdpdemux.c
@@
-410,9
+410,16
@@
gst_sdp_demux_create_stream (GstSDPDemux * demux, GstSDPMessage * sdp, gint idx)
}
}
}
- if (!(conn = gst_sdp_media_get_connection (media, 0))) {
- if (!(conn = gst_sdp_message_get_connection (sdp)))
+
+ if (gst_sdp_media_connections_len (media) > 0) {
+ if (!(conn = gst_sdp_media_get_connection (media, 0))) {
+ /* We should not reach this based on the check above */
goto no_connection;
+ }
+ } else {
+ if (!(conn = gst_sdp_message_get_connection (sdp))) {
+ goto no_connection;
+ }
}
if (!conn->address)