mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 18:05:37 +00:00
sdpdemux: Don't assert in GstAdapter if no data was received before EOS
This commit is contained in:
parent
b88d93ff7b
commit
a4a2638d86
1 changed files with 10 additions and 1 deletions
|
@ -1276,7 +1276,7 @@ gst_sdp_demux_handle_message (GstBin * bin, GstMessage * message)
|
|||
static gboolean
|
||||
gst_sdp_demux_start (GstSDPDemux * demux)
|
||||
{
|
||||
guint8 *data;
|
||||
guint8 *data = NULL;
|
||||
guint size;
|
||||
gint i, n_streams;
|
||||
GstSDPMessage sdp = { 0 };
|
||||
|
@ -1291,6 +1291,9 @@ gst_sdp_demux_start (GstSDPDemux * demux)
|
|||
GST_DEBUG_OBJECT (demux, "parse SDP...");
|
||||
|
||||
size = gst_adapter_available (demux->adapter);
|
||||
if (size == 0)
|
||||
goto no_data;
|
||||
|
||||
data = gst_adapter_take (demux->adapter, size);
|
||||
|
||||
gst_sdp_message_init (&sdp);
|
||||
|
@ -1434,6 +1437,12 @@ no_manager:
|
|||
("Could not create RTP session manager."));
|
||||
goto done;
|
||||
}
|
||||
no_data:
|
||||
{
|
||||
GST_ELEMENT_ERROR (demux, STREAM, TYPE_NOT_FOUND, (NULL),
|
||||
("Empty SDP message."));
|
||||
goto done;
|
||||
}
|
||||
could_not_parse:
|
||||
{
|
||||
GST_ELEMENT_ERROR (demux, STREAM, TYPE_NOT_FOUND, (NULL),
|
||||
|
|
Loading…
Reference in a new issue