diff options
Diffstat (limited to 'libaf/af_format.c')
-rw-r--r-- | libaf/af_format.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libaf/af_format.c b/libaf/af_format.c index 64acbbb9b6..3b9b907882 100644 --- a/libaf/af_format.c +++ b/libaf/af_format.c @@ -98,6 +98,8 @@ static int control(struct af_instance_s* af, int cmd, void* arg) af->data->bps == data->bps) return AF_DETACH; + // Allow trivial AC3-endianness conversion + if (!AF_FORMAT_IS_AC3(af->data->format) || !AF_FORMAT_IS_AC3(data->format)) // Check for errors in configuration if((AF_OK != check_bps(data->bps)) || (AF_OK != check_format(data->format)) || @@ -152,7 +154,7 @@ static int control(struct af_instance_s* af, int cmd, void* arg) } case AF_CONTROL_FORMAT_FMT | AF_CONTROL_SET:{ // Check for errors in configuration - if(AF_OK != check_format(*(int*)arg)) + if(!AF_FORMAT_IS_AC3(*(int*)arg) && AF_OK != check_format(*(int*)arg)) return AF_ERROR; af->data->format = *(int*)arg; |