summaryrefslogtreecommitdiff
path: root/gst
diff options
context:
space:
mode:
authorThibault Saunier <tsaunier@igalia.com>2020-07-22 14:31:13 -0400
committerGStreamer Merge Bot <gitlab-merge-bot@gstreamer-foundation.org>2020-07-28 07:35:37 +0000
commit18aeb5bac1862e9f3da45ca2587ad2fe2b9c5fe4 (patch)
tree78f9066ff9a0c9e3b41a27afeae686e631e1b325 /gst
parent10f07e84a57c59ecec268c405995f204f9c19af0 (diff)
matroskamux: Do caps renegotiation when it only adds fields
Matroskamux can accept caps renegotiation if the new caps is a superset of the old one, meaning upstream added new info to the caps. Same logic as a5f22f03aa25b04726f78ae619f40b3b648f7d48 in qtmux. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/678>
Diffstat (limited to 'gst')
-rw-r--r--gst/matroska/matroska-mux.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gst/matroska/matroska-mux.c b/gst/matroska/matroska-mux.c
index b99dd71c1..3d3a233fb 100644
--- a/gst/matroska/matroska-mux.c
+++ b/gst/matroska/matroska-mux.c
@@ -970,9 +970,10 @@ gst_matroska_mux_video_pad_setcaps (GstPad * pad, GstCaps * caps)
if ((old_caps = gst_pad_get_current_caps (pad))) {
if (mux->state >= GST_MATROSKA_MUX_STATE_HEADER
- && !gst_caps_is_equal (caps, old_caps)) {
+ && !gst_caps_is_subset (caps, old_caps)) {
GST_ELEMENT_ERROR (mux, STREAM, MUX, (NULL),
- ("Caps changes are not supported by Matroska"));
+ ("Caps changes are not supported by Matroska\nCurrent: `%"
+ GST_PTR_FORMAT "`\nNew: `%" GST_PTR_FORMAT "`", old_caps, caps));
gst_caps_unref (old_caps);
goto refuse_caps;
}