From a4177fd5814300be95a050413f18bfc89f5c93df Mon Sep 17 00:00:00 2001 From: reimar Date: Thu, 29 Nov 2012 17:03:04 +0000 Subject: audio: make AC3 pass-through with ad_spdif work Do not fall back to 0 for samplerate when parser is not initialized. Might fix some issues with using -ac spdifenc with audio in MKV or MP4. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35517 b3059339-0415-0410-9bf9-f77b7e298cf2 Replace outdated list of unsupported formats by list of supported formats. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35534 b3059339-0415-0410-9bf9-f77b7e298cf2 Do not call af_fmt2str on the same data over and over. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35535 b3059339-0415-0410-9bf9-f77b7e298cf2 ad_spdif: use the more specific AF_FORMAT_AC3_LE when we handle AC3. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35536 b3059339-0415-0410-9bf9-f77b7e298cf2 Make AF_FORMAT_IS_IEC61937 include AF_FORMAT_IS_AC3. Our AC3 "sample format" is also iec61937. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35537 b3059339-0415-0410-9bf9-f77b7e298cf2 af_format: support endianness conversion also for iec61937 formats in general, not just AC3. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35538 b3059339-0415-0410-9bf9-f77b7e298cf2 Conflicts: audio/filter/af_format.c af_format: Fix check_format, non-special formats are of course supported. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35545 b3059339-0415-0410-9bf9-f77b7e298cf2 Note: see mplayer bug #2110 --- audio/out/ao_alsa.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'audio/out/ao_alsa.c') diff --git a/audio/out/ao_alsa.c b/audio/out/ao_alsa.c index 4fe744320b..9a29beec7a 100644 --- a/audio/out/ao_alsa.c +++ b/audio/out/ao_alsa.c @@ -112,7 +112,7 @@ static int control(int cmd, void *arg) long get_vol, set_vol; float f_multi; - if(AF_FORMAT_IS_AC3(ao_data.format) || AF_FORMAT_IS_IEC61937(ao_data.format)) + if(AF_FORMAT_IS_IEC61937(ao_data.format)) return CONTROL_TRUE; if(mixer_channel) { @@ -436,7 +436,7 @@ static int init(int rate_hz, int channels, int format, int flags) * while opening the abstract alias for the spdif subdevice * 'iec958' */ - if (AF_FORMAT_IS_AC3(format) || AF_FORMAT_IS_IEC61937(format)) { + if (AF_FORMAT_IS_IEC61937(format)) { device.str = "iec958"; mp_msg(MSGT_AO,MSGL_V,"alsa-spdif-init: playing AC3/iec61937/iec958, %i channels\n", channels); } @@ -489,7 +489,7 @@ static int init(int rate_hz, int channels, int format, int flags) if (!alsa_handler) { int open_mode = block ? 0 : SND_PCM_NONBLOCK; - int isac3 = AF_FORMAT_IS_AC3(format) || AF_FORMAT_IS_IEC61937(format); + int isac3 = AF_FORMAT_IS_IEC61937(format); //modes = 0, SND_PCM_NONBLOCK, SND_PCM_ASYNC if ((err = try_open_device(alsa_device, open_mode, isac3)) < 0) { -- cgit v1.2.3