infinite loop in src/pcm/pcm_params.c function snd_pcm_sw_params_default()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I found this infinite loop while playing with the test/latency.c function. When I specify too small of a minimum latency (in my case -m 256 or smaller) it winds up:

at line line 2337:
	params->boundary = pcm->buffer_size;
	while (params->boundary * 2 <= LONG_MAX - pcm->buffer_size)
		params->boundary *= 2;
	return 0;

but when pcm->buffer_size is zero this is an infinite loop. It does this *after* setting the scheduling to round-robin which makes the infinite loop so much more painful.

The return value from this function is ignored where it's called so I'm not sure what the best fix is. I'm guessing it's a rare case since it's not been previously reported but it deserves fixing anyway.



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux