adaptivedemux2: Answer GST_QUERY_CAPS

If we have a generic caps, we can answer the query.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6716>
This commit is contained in:
Edward Hervey 2024-04-19 11:31:04 +02:00 committed by Backport Bot
parent 19e613d889
commit e534f681b4

View file

@ -2650,6 +2650,17 @@ gst_adaptive_demux_src_query (GstPad * pad, GstObject * parent,
GST_TIME_FORMAT, ret ? "TRUE" : "FALSE", GST_TIME_ARGS (duration));
break;
}
case GST_QUERY_CAPS:
{
OutputSlot *slot = gst_pad_get_element_private (pad);
if (slot->track && slot->track->generic_caps) {
GST_DEBUG_OBJECT (demux, "Answering caps query %" GST_PTR_FORMAT,
slot->track->generic_caps);
gst_query_set_caps_result (query, slot->track->generic_caps);
ret = TRUE;
}
break;
}
case GST_QUERY_LATENCY:{
gst_query_set_latency (query, FALSE, 0, -1);
ret = TRUE;