mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
qtmux: Don't need to update track per GstCaps if it's not changed
Skip GstQTMuxPad::set_caps() call for duplicated caps. All the processing done in set_caps() method for duplicated caps are redundant. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1019>
This commit is contained in:
parent
6e2924ff9c
commit
adae01e4c3
1 changed files with 13 additions and 1 deletions
|
@ -6860,7 +6860,19 @@ gst_qt_mux_sink_event (GstAggregator * agg, GstAggregatorPad * agg_pad,
|
||||||
/* find stream data */
|
/* find stream data */
|
||||||
g_assert (qtmux_pad->set_caps);
|
g_assert (qtmux_pad->set_caps);
|
||||||
|
|
||||||
ret = qtmux_pad->set_caps (qtmux_pad, caps);
|
/* depending on codec (h264/h265 for example), muxer will append a new
|
||||||
|
* stsd entry per set_caps(), but it's not ideal if referenced fields
|
||||||
|
* in caps is not updated from previous one.
|
||||||
|
* Each set_caps() implementation can be more enhanced
|
||||||
|
* so that we can avoid duplicated atoms though, this identical caps
|
||||||
|
* case is one we can skip obviously */
|
||||||
|
if (qtmux_pad->configured_caps &&
|
||||||
|
gst_caps_is_equal (qtmux_pad->configured_caps, caps)) {
|
||||||
|
GST_DEBUG_OBJECT (qtmux_pad, "Ignore duplicated caps %" GST_PTR_FORMAT,
|
||||||
|
caps);
|
||||||
|
} else {
|
||||||
|
ret = qtmux_pad->set_caps (qtmux_pad, caps);
|
||||||
|
}
|
||||||
|
|
||||||
if (ret)
|
if (ret)
|
||||||
gst_caps_replace (&qtmux_pad->configured_caps, caps);
|
gst_caps_replace (&qtmux_pad->configured_caps, caps);
|
||||||
|
|
Loading…
Reference in a new issue