[alsa-devel] axfer: Fix creation of v1.2 headers on big-endian systems
alsa-project/alsa-utils pull request #15 was opened from smaeul:
struct block_v120_format defines these members as uint8_t. On little-endian systems, no swapping is done, and the generated block header is fine. However, on big-endian machines, the value is swapped to the high byte and then truncated by the assignment, causing both bits_per_sample and samples_per_frame to be zero.
This fixes an assertion failure in container-test when later parsing the header ["assert(*samples_per_frame > 0);" in container_context_pre_process()].
Signed-off-by: Samuel Holland samuel@sholland.org
Request URL : https://github.com/alsa-project/alsa-utils/pull/15 Patch URL : https://github.com/alsa-project/alsa-utils/pull/15.patch Repository URL: https://github.com/alsa-project/alsa-utils
participants (1)
-
GitHub pull_request - opened