gst/pipewiresink: remove special case for size 0

There is no need for a special case with size 0. If size is 0, we can
also write the size instead of 0 to the buffer.
This commit is contained in:
Michael Tretter 2023-11-09 10:22:10 +01:00 committed by Wim Taymans
parent 0bda84bca1
commit 6a68c87b19

View file

@ -244,11 +244,6 @@ pool_activated (GstPipeWirePool *pool, GstPipeWireSink *sink)
spa_pod_builder_init (&b, buffer, sizeof (buffer));
spa_pod_builder_push_object (&b, &f, SPA_TYPE_OBJECT_ParamBuffers, SPA_PARAM_Buffers);
if (size == 0)
spa_pod_builder_add (&b,
SPA_PARAM_BUFFERS_size, SPA_POD_CHOICE_RANGE_Int(0, 0, INT32_MAX),
0);
else
spa_pod_builder_add (&b,
SPA_PARAM_BUFFERS_size, SPA_POD_CHOICE_RANGE_Int(size, size, INT32_MAX),
0);