hlsdemux: add support for redirections
authorAndoni Morales Alastruey <ylatuya@gmail.com>
Sat, 13 Jul 2013 00:50:52 +0000 (02:50 +0200)
committerAndoni Morales Alastruey <ylatuya@gmail.com>
Mon, 12 Aug 2013 14:41:52 +0000 (16:41 +0200)
ext/hls/gsthlsdemux.c

index 2dfb8560a287f61a6c81e9365f67c1264b52600f..efa712d5b5d35f5e7fe28065d195afaa3a9d7ae7 100644 (file)
@@ -470,7 +470,9 @@ gst_hls_demux_sink_event (GstPad * pad, GstObject * parent, GstEvent * event)
       query = gst_query_new_uri ();
       ret = gst_pad_peer_query (demux->sinkpad, query);
       if (ret) {
-        gst_query_parse_uri (query, &uri);
+        gst_query_parse_uri_redirection (query, &uri);
+        if (uri == NULL)
+          gst_query_parse_uri (query, &uri);
         gst_hls_demux_set_location (demux, uri);
         g_free (uri);
       }