mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-30 04:00:37 +00:00
qtdemux: Do not post empty redirect messages
Some misinterpreted data could result in posting redirect messages with empty redirect strings. It is better not to post them. An example is the file on bug #597497
This commit is contained in:
parent
891ca1f4d3
commit
b53a45ed44
1 changed files with 10 additions and 8 deletions
|
@ -2563,18 +2563,20 @@ gst_qtdemux_decorate_and_push_buffer (GstQTDemux * qtdemux,
|
||||||
GstFlowReturn ret = GST_FLOW_OK;
|
GstFlowReturn ret = GST_FLOW_OK;
|
||||||
|
|
||||||
if (G_UNLIKELY (stream->fourcc == FOURCC_rtsp)) {
|
if (G_UNLIKELY (stream->fourcc == FOURCC_rtsp)) {
|
||||||
GstMessage *m;
|
|
||||||
gchar *url;
|
gchar *url;
|
||||||
|
|
||||||
url = g_strndup ((gchar *) GST_BUFFER_DATA (buf), GST_BUFFER_SIZE (buf));
|
url = g_strndup ((gchar *) GST_BUFFER_DATA (buf), GST_BUFFER_SIZE (buf));
|
||||||
|
if (url != NULL && strlen (url) != 0) {
|
||||||
/* we have RTSP redirect now */
|
/* we have RTSP redirect now */
|
||||||
m = gst_message_new_element (GST_OBJECT_CAST (qtdemux),
|
gst_element_post_message (GST_ELEMENT_CAST (qtdemux),
|
||||||
|
gst_message_new_element (GST_OBJECT_CAST (qtdemux),
|
||||||
gst_structure_new ("redirect",
|
gst_structure_new ("redirect",
|
||||||
"new-location", G_TYPE_STRING, url, NULL));
|
"new-location", G_TYPE_STRING, url, NULL)));
|
||||||
|
} else {
|
||||||
|
GST_WARNING_OBJECT (qtdemux, "Redirect URI of stream is empty, not "
|
||||||
|
"posting");
|
||||||
|
}
|
||||||
g_free (url);
|
g_free (url);
|
||||||
|
|
||||||
gst_element_post_message (GST_ELEMENT_CAST (qtdemux), m);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* position reporting */
|
/* position reporting */
|
||||||
|
|
Loading…
Reference in a new issue