urisourcebin: Make use of adaptive demuxer variable
https://bugzilla.gnome.org/show_bug.cgi?id=772445
This commit is contained in:
parent
b0866b9cc1
commit
9e8c0d224b
@ -1861,16 +1861,15 @@ handle_new_pad (GstURISourceBin * urisrc, GstPad * srcpad, GstCaps * caps)
|
|||||||
urisrc->is_adaptive = IS_ADAPTIVE_MEDIA (media_type);
|
urisrc->is_adaptive = IS_ADAPTIVE_MEDIA (media_type);
|
||||||
|
|
||||||
if (urisrc->is_adaptive) {
|
if (urisrc->is_adaptive) {
|
||||||
GstElement *demux_elem;
|
|
||||||
GstPad *sinkpad;
|
GstPad *sinkpad;
|
||||||
GstPadLinkReturn link_res;
|
GstPadLinkReturn link_res;
|
||||||
|
|
||||||
demux_elem = make_demuxer (urisrc, caps);
|
urisrc->demuxer = make_demuxer (urisrc, caps);
|
||||||
if (!demux_elem)
|
if (!urisrc->demuxer)
|
||||||
goto no_demuxer;
|
goto no_demuxer;
|
||||||
gst_bin_add (GST_BIN_CAST (urisrc), demux_elem);
|
gst_bin_add (GST_BIN_CAST (urisrc), urisrc->demuxer);
|
||||||
|
|
||||||
sinkpad = gst_element_get_static_pad (demux_elem, "sink");
|
sinkpad = gst_element_get_static_pad (urisrc->demuxer, "sink");
|
||||||
if (sinkpad == NULL)
|
if (sinkpad == NULL)
|
||||||
goto no_demuxer_sink;
|
goto no_demuxer_sink;
|
||||||
|
|
||||||
@ -1880,7 +1879,7 @@ handle_new_pad (GstURISourceBin * urisrc, GstPad * srcpad, GstCaps * caps)
|
|||||||
if (link_res != GST_PAD_LINK_OK)
|
if (link_res != GST_PAD_LINK_OK)
|
||||||
goto could_not_link;
|
goto could_not_link;
|
||||||
|
|
||||||
gst_element_sync_state_with_parent (demux_elem);
|
gst_element_sync_state_with_parent (urisrc->demuxer);
|
||||||
} else {
|
} else {
|
||||||
OutputSlotInfo *slot;
|
OutputSlotInfo *slot;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user