Skip to content

v4l2sink: fix pool-less allocation query handling

This fixes a critical warning if the last-sample property is enabled:

(gst-launch-1.0:391): GStreamer-CRITICAL **: 01:12:57.428: gst_object_unref: assertion 'object != NULL' failed

If the allocation query does not contain any allocation pools, gst_query_parse_nth_allocation_pool will leave the local pool, min, and max variables undefined, so check the array length first. This part is not really a problem because gst_query_set_nth_allocation_pool will just fail silently as well. But if pool is NULL, do not call gst_object_unref.

Merge request reports