mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 18:21:04 +00:00
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 a5f22f03aa
in qtmux.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/678>
This commit is contained in:
parent
10f07e84a5
commit
18aeb5bac1
1 changed files with 3 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue