mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-14 10:15:48 +00:00
onvif-media: Error for streams that have EMPTY/ANY caps
Don't silently fail to put a stream in the SDP if the caps are empty or ANY Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8378>
This commit is contained in:
parent
c83c7f9a92
commit
1a4b683225
1 changed files with 7 additions and 0 deletions
|
@ -111,6 +111,13 @@ gst_rtsp_onvif_media_setup_sdp (GstRTSPMedia * media, GstSDPMessage * sdp,
|
||||||
}
|
}
|
||||||
|
|
||||||
n_caps = gst_caps_get_size (caps);
|
n_caps = gst_caps_get_size (caps);
|
||||||
|
if (n_caps == 0) {
|
||||||
|
GST_ERROR ("media caps for stream %p are %" GST_PTR_FORMAT, stream, caps);
|
||||||
|
res = FALSE;
|
||||||
|
gst_caps_unref (caps);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
for (j = 0; res && j < n_caps; j++) {
|
for (j = 0; res && j < n_caps; j++) {
|
||||||
GstStructure *s = gst_caps_get_structure (caps, j);
|
GstStructure *s = gst_caps_get_structure (caps, j);
|
||||||
GstCaps *media_caps = gst_caps_new_full (gst_structure_copy (s), NULL);
|
GstCaps *media_caps = gst_caps_new_full (gst_structure_copy (s), NULL);
|
||||||
|
|
Loading…
Reference in a new issue