From 32a88fe16f7020a277444fba92178c17acee85e5 Mon Sep 17 00:00:00 2001 From: Thibault Saunier Date: Tue, 5 Oct 2021 10:50:32 -0300 Subject: [PATCH] matroskamux: Ignore some fields when renegotiating Those values are never used in the muxer so we should not fail the negotiation if those are changing. Part-of: --- .../gst-plugins-good/gst/matroska/matroska-mux.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/subprojects/gst-plugins-good/gst/matroska/matroska-mux.c b/subprojects/gst-plugins-good/gst/matroska/matroska-mux.c index c7a5adf..5d48b67 100644 --- a/subprojects/gst-plugins-good/gst/matroska/matroska-mux.c +++ b/subprojects/gst-plugins-good/gst/matroska/matroska-mux.c @@ -989,6 +989,25 @@ check_field (GQuark field_id, const GValue * value, gpointer user_data) } else if (field_id == g_quark_from_static_string ("level")) { return FALSE; } + } else if (gst_structure_has_name (structure, "video/x-vp8") + || gst_structure_has_name (structure, "video/x-vp9")) { + /* We do not use profile and streamheader for VPX so let it change + * mid stream */ + if (field_id == g_quark_from_static_string ("streamheader")) + return FALSE; + else if (field_id == g_quark_from_static_string ("profile")) + return FALSE; + } + + /* This fields aren't used and are not retained into the bitstream so we can + * discard them. */ + if (g_str_has_prefix (gst_structure_get_name (structure), "video/")) { + if (field_id == g_quark_from_static_string ("chroma-site")) + return FALSE; + else if (field_id == g_quark_from_static_string ("chroma-format")) + return FALSE; + else if (field_id == g_quark_from_static_string ("bit-depth-luma")) + return FALSE; } return TRUE; -- 2.7.4