Skip to contentSkip to conversation

axfer: Fix creation of v1.2 headers on big-endian systems

DISCUSSION GitHub pull_request - opened 1 participant 1 message Apr 21, 2019 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

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()].

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