pipewiresrc plane mapping is wrong
I just bumped into a bug, which I worked around eventually, but it needs to be solved properly and I'm recording it here so that I don't forget about it.
pipewiresrc creates a GstVideoMeta
that has n_planes set to the number of memory areas in the pipewire buffer. I just bumped into a case where I was recording something from a camera (libcamera source) that had NV21 format (2 planes) and the pipewire buffer only had 1 memory segment. So eventually the GstVideoMeta::n_planes
was set to 1, but gst_video_frame_map
expects the n_planes to match whatever is in the GstVideoInfo
, so it asserts.