[MPlayer-cvslog] r35538 - trunk/libaf/af_format.c
reimar
subversion at mplayerhq.hu
Fri Nov 30 21:11:58 CET 2012
Author: reimar
Date: Fri Nov 30 21:11:58 2012
New Revision: 35538
Log:
af_format: support endianness conversion also for iec61937
formats in general, not just AC3.
Modified:
trunk/libaf/af_format.c
Modified: trunk/libaf/af_format.c
==============================================================================
--- trunk/libaf/af_format.c Fri Nov 30 21:10:40 2012 (r35537)
+++ trunk/libaf/af_format.c Fri Nov 30 21:11:58 2012 (r35538)
@@ -94,14 +94,23 @@ static int control(struct af_instance_s*
char buf1[256];
char buf2[256];
af_data_t *data = arg;
+ int supported_ac3 = 0;
// Make sure this filter isn't redundant
if(af->data->format == data->format &&
af->data->bps == data->bps)
return AF_DETACH;
+ // A bit complex because we can convert AC3
+ // to generic iec61937 but not the other way
+ // round.
+ if (AF_FORMAT_IS_AC3(af->data->format))
+ supported_ac3 = AF_FORMAT_IS_AC3(data->format);
+ else if (AF_FORMAT_IS_IEC61937(af->data->format))
+ supported_ac3 = AF_FORMAT_IS_IEC61937(data->format);
+
// Allow trivial AC3-endianness conversion
- if (!AF_FORMAT_IS_AC3(af->data->format) || !AF_FORMAT_IS_AC3(data->format))
+ if (!supported_ac3)
// Check for errors in configuration
if((AF_OK != check_bps(data->bps)) ||
(AF_OK != check_format(data->format)) ||
More information about the MPlayer-cvslog
mailing list