gst: src: Fix buffer pool handling in case of caps renegotiation

In case negotiation is first attempted with unfixed caps, bufferpool support was
unconditionally disabled. Then at a second caps negotiation attempt it wasn't
restored according to the property value.
This commit is contained in:
Philippe Normand 2025-03-25 10:16:47 +00:00 committed by Arun Raghavan
parent 14b7b31bd9
commit e584cee066

View file

@ -1135,14 +1135,15 @@ handle_format_change (GstPipeWireSrc *pwsrc,
#ifdef HAVE_GSTREAMER_DMA_DRM
}
#endif
} else {
/* Don't provide bufferpool for audio if not requested by the
* application/user */
if (pwsrc->use_bufferpool != USE_BUFFERPOOL_YES)
pwsrc->use_bufferpool = USE_BUFFERPOOL_NO;
}
} else {
pwsrc->negotiated = FALSE;
pwsrc->is_video = FALSE;
/* Don't provide bufferpool for audio if not requested by the application/user */
if (pwsrc->use_bufferpool != USE_BUFFERPOOL_YES)
pwsrc->use_bufferpool = USE_BUFFERPOOL_NO;
}
if (pwsrc->caps) {