| Message ID | 20261012200509.848642-1-b-brnich@ti.com |
|---|---|
| State | New |
| Headers | show |
| Series | [meta-arago,wrynose] gstreamer1.0-plugins-good: Port SIGSEGV Fix During Caps Negotiation | expand |
meta-arago / na / 20261012200509.848642-1-b-brnich
PRC Results: FAIL
=========================================================
check-yocto-patches: PASS
=========================================================
Patches
----------------------------------------
All patches passed
=========================================================
apply-yocto-patch: PASS
=========================================================
wrynose
=====================
Summary:
- Patch Series: [meta-arago][wrynose][PATCH] gstreamer1.0-plugins-good: Port SIGSEGV Fix During Caps Negotiation
- Submitter: From: Brandon Brnich <b-brnich@ti.com>
+From: Qi Hou <qi.hou@nxp.com>
- Date: Date: Mon, 12 Oct 2026 15:05:09 -0500
+Date: Wed, 23 Sep 2026 15:31:30 +0900
- Num Patches: 1
- Mailing List (public inbox) Commit SHA: 9632b11ba70756aa5fae718255aa38072f6e7025
Applied to:
- Repository: lcpd-prc-meta-arago
- Base Branch: wrynose-wip
- Commit Author: Randolph Sapp <rs@ti.com>
- Commit Subject: weston-init-arago: set WAIT_CARD_DEVICE_COUNT
- Commit SHA: b61dd849b8ea9ba1f875f51249bc2ee42b08c4d5
Patches
----------------------------------------
All patches applied
=========================================================
check-yocto-repo: FAIL
=========================================================
wrynose
=====================
FAIL
WARN: You might need a " " as the first character for the :append. (APPEND-2)
meta-arago-distro/recipes-graphics/emptty/emptty.bb:10
GO_TAGS:append = "${@bb.utils.contains('PACKAGECONFIG', 'pam', '', ',nopam', d)}"
WARN: You might need a " " as the first character for the :append. (APPEND-2)
meta-arago-distro/recipes-graphics/emptty/emptty.bb:11
GO_TAGS:append = "${@bb.utils.contains('PACKAGECONFIG', 'x11', '', ',noxlib', d)}"
For details on the above errors/warnings visit: https://lists.yoctoproject.org/g/meta-ti/wiki/40887
diff --git a/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0008-v4l2-object-Don-t-corrupt-the-caller-s-filter-caps-w.patch b/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0008-v4l2-object-Don-t-corrupt-the-caller-s-filter-caps-w.patch new file mode 100644 index 00000000..31b147ad --- /dev/null +++ b/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0008-v4l2-object-Don-t-corrupt-the-caller-s-filter-caps-w.patch @@ -0,0 +1,55 @@ +From 872040cd7cc755bd970e4642a521168d6e19df63 Mon Sep 17 00:00:00 2001 +From: Qi Hou <qi.hou@nxp.com> +Date: Wed, 23 Sep 2026 15:31:30 +0900 +Subject: [PATCH] v4l2: object: Don't corrupt the caller's filter caps when + probing + +In gst_v4l2_object_probe_caps(), the DMABuf candidate branch built the +temporary format_caps with gst_caps_append_structure() and then called +gst_caps_set_features() on the incoming filter caps to attach +GST_CAPS_FEATURE_MEMORY_DMABUF. + +That is wrong for three reasons: + + - filter is owned by the caller (the pad caps query), so modifying it + leaks a side effect back to the caller and can hit a writability + assertion when the caps refcount is greater than one. + - only structure index 0 was touched, leaving any other structure in + the filter untouched. + - the feature belongs on the candidate caps we are about to intersect + against the filter, not on the filter itself, so the pre-probe + intersection test could pick the wrong formats. + +Attach the memory:DMABuf feature to the candidate structure directly via +gst_caps_append_structure_full(), which is what the rest of the file +(gst_v4l2_object_get_caps_helper(), gst_v4l2_object_update_and_append()) +already does, and leave filter untouched. + +No functional change intended for the resulting probed caps; this only +fixes the filter corruption and makes the cheap pre-probe rejection test +behave as documented. + +Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12529> +Upstream-Status: Backport [1.28.8] +--- + sys/v4l2/gstv4l2object.c | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +diff --git a/sys/v4l2/gstv4l2object.c b/sys/v4l2/gstv4l2object.c +index 7d35c34..9dd0c46 100644 +--- a/sys/v4l2/gstv4l2object.c ++++ b/sys/v4l2/gstv4l2object.c +@@ -5475,9 +5475,10 @@ gst_v4l2_object_probe_caps (GstV4l2Object * v4l2object, GstCaps * filter) + GstCaps *format_caps = gst_caps_new_empty (); + + if (dmabuf_tmpl) { +- gst_caps_append_structure (format_caps, +- gst_structure_copy (dmabuf_tmpl)); +- gst_caps_set_features (filter, 0, ++ /* Tag the candidate structure itself with the DMABuf memory feature ++ * instead of corrupting the caller owned filter caps. */ ++ gst_caps_append_structure_full (format_caps, ++ gst_structure_copy (dmabuf_tmpl), + gst_caps_features_new_single_static_str + (GST_CAPS_FEATURE_MEMORY_DMABUF)); + add_alternate_variant (v4l2object, format_caps, dmabuf_tmpl, diff --git a/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.28-arago.inc b/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.28-arago.inc index a2204efb..2d3d85bb 100644 --- a/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.28-arago.inc +++ b/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.28-arago.inc @@ -8,6 +8,7 @@ SRC_URI:append = " \ file://0005-HACK-gstv4l2object-Increase-min-buffers-for-CSI-capt.patch \ file://0006-v4l2object-use-actual-stream-resolution-for-encoded-.patch \ file://0007-v4l2object-Attempt-non-contiguous-if-contiguous-form.patch \ + file://0008-v4l2-object-Don-t-corrupt-the-caller-s-filter-caps-w.patch \ " PR:append = ".arago0"
Multistream cases are periodically failing because of improper caps negotiation. This fix has already been backported in upstream gstreamer and was part of official 1.28.8 release. This patch will be dropped from meta-arago once oe-core migrates to latest 1.28.x version. Signed-off-by: Brandon Brnich <b-brnich@ti.com> --- Wrynose is only on version 1.28.5 - it will be quite some time before the migration is done to 1.28.8. Without this patch, multistream decode isn't reliable. Master is closer - currently sitting at 1.28.7. Gstreamer just released 1.28.8 on Octber 8th and master will soon move so I don't plan to port this to master. ...t-corrupt-the-caller-s-filter-caps-w.patch | 55 +++++++++++++++++++ .../gstreamer1.0-plugins-good_1.28-arago.inc | 1 + 2 files changed, 56 insertions(+) create mode 100644 meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0008-v4l2-object-Don-t-corrupt-the-caller-s-filter-caps-w.patch