From 2746ded2e1ddbacbfdca9dabd30a6794bffeeec0 Mon Sep 17 00:00:00 2001 From: Tristan Matthews Date: Mon, 7 Feb 2022 16:41:40 -0500 Subject: [PATCH] matroskamux: allow width + height changes for avc3|hev1 For avc3 and hev1, the intent was to allow more flexibility for caps changes (see https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1047/diffs?commit_id=9bd8d608d5bae27ec5ff09e733f76ca32b17420c) however width and resolution were previously omitted. avc3 and hev1 specifically support changing stream-parameters on the fly, whereas avc1/hvc1 disallow in-band SPS. This commit allows for changes to width and height for these which is in line with matroskamux's behaviour prior to 1.14.0. Practically speaking, one use case where this is commonly seen is when capturing a WebRTC stream, as the browser will adapt the resolution live. Suggested-by: Mathieu Duponchelle "" Part-of: --- subprojects/gst-plugins-good/gst/matroska/matroska-mux.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/subprojects/gst-plugins-good/gst/matroska/matroska-mux.c b/subprojects/gst-plugins-good/gst/matroska/matroska-mux.c index 6a56037a1e..5c492348b0 100644 --- a/subprojects/gst-plugins-good/gst/matroska/matroska-mux.c +++ b/subprojects/gst-plugins-good/gst/matroska/matroska-mux.c @@ -988,6 +988,10 @@ check_field (GQuark field_id, const GValue * value, gpointer user_data) return FALSE; } else if (field_id == g_quark_from_static_string ("level")) { return FALSE; + } else if (field_id == g_quark_from_static_string ("width")) { + return FALSE; + } else if (field_id == g_quark_from_static_string ("height")) { + return FALSE; } } else if (gst_structure_has_name (structure, "video/x-vp8") || gst_structure_has_name (structure, "video/x-vp9")) {