ao: fix crash after ao init failure (from recent 3a5fd15fa2)
[mplayer/greg.git] / libmpcodecs / ad.c
blob68d2c4470879b4faab00c345aaf30113b5c588a2
1 /*
2 * audio decoder interface
4 * This file is part of MPlayer.
6 * MPlayer is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * MPlayer is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License along
17 * with MPlayer; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
21 #include <stdio.h>
22 #include <stdlib.h>
23 #include <string.h>
25 #include "config.h"
27 #include "stream/stream.h"
28 #include "libmpdemux/demuxer.h"
29 #include "libmpdemux/stheader.h"
30 #include "ad.h"
32 /* Missed vorbis, mad, dshow */
34 extern const ad_functions_t mpcodecs_ad_mpg123;
35 extern const ad_functions_t mpcodecs_ad_ffmpeg;
36 extern const ad_functions_t mpcodecs_ad_liba52;
37 extern const ad_functions_t mpcodecs_ad_hwac3;
38 extern const ad_functions_t mpcodecs_ad_hwmpa;
39 extern const ad_functions_t mpcodecs_ad_pcm;
40 extern const ad_functions_t mpcodecs_ad_dvdpcm;
41 extern const ad_functions_t mpcodecs_ad_alaw;
42 extern const ad_functions_t mpcodecs_ad_imaadpcm;
43 extern const ad_functions_t mpcodecs_ad_msadpcm;
44 extern const ad_functions_t mpcodecs_ad_dk3adpcm;
45 extern const ad_functions_t mpcodecs_ad_dk4adpcm;
46 extern const ad_functions_t mpcodecs_ad_dshow;
47 extern const ad_functions_t mpcodecs_ad_dmo;
48 extern const ad_functions_t mpcodecs_ad_acm;
49 extern const ad_functions_t mpcodecs_ad_faad;
50 extern const ad_functions_t mpcodecs_ad_libvorbis;
51 extern const ad_functions_t mpcodecs_ad_speex;
52 extern const ad_functions_t mpcodecs_ad_libmad;
53 extern const ad_functions_t mpcodecs_ad_realaud;
54 extern const ad_functions_t mpcodecs_ad_libdv;
55 extern const ad_functions_t mpcodecs_ad_qtaudio;
56 extern const ad_functions_t mpcodecs_ad_twin;
57 extern const ad_functions_t mpcodecs_ad_libmusepack;
58 extern const ad_functions_t mpcodecs_ad_libdca;
60 const ad_functions_t * const mpcodecs_ad_drivers[] =
62 #ifdef CONFIG_MPG123
63 &mpcodecs_ad_mpg123,
64 #endif
65 #ifdef CONFIG_LIBA52
66 &mpcodecs_ad_liba52,
67 #endif
68 &mpcodecs_ad_hwac3,
69 &mpcodecs_ad_hwmpa,
70 #ifdef CONFIG_FFMPEG
71 &mpcodecs_ad_ffmpeg,
72 #endif
73 &mpcodecs_ad_pcm,
74 &mpcodecs_ad_dvdpcm,
75 &mpcodecs_ad_alaw,
76 &mpcodecs_ad_imaadpcm,
77 &mpcodecs_ad_msadpcm,
78 &mpcodecs_ad_dk3adpcm,
79 #ifdef CONFIG_WIN32DLL
80 &mpcodecs_ad_dshow,
81 &mpcodecs_ad_dmo,
82 &mpcodecs_ad_acm,
83 &mpcodecs_ad_twin,
84 #endif
85 #ifdef CONFIG_QTX_CODECS
86 &mpcodecs_ad_qtaudio,
87 #endif
88 #ifdef CONFIG_FAAD
89 &mpcodecs_ad_faad,
90 #endif
91 #ifdef CONFIG_OGGVORBIS
92 &mpcodecs_ad_libvorbis,
93 #endif
94 #ifdef CONFIG_SPEEX
95 &mpcodecs_ad_speex,
96 #endif
97 #ifdef CONFIG_LIBMAD
98 &mpcodecs_ad_libmad,
99 #endif
100 #ifdef CONFIG_REALCODECS
101 &mpcodecs_ad_realaud,
102 #endif
103 #ifdef CONFIG_LIBDV095
104 &mpcodecs_ad_libdv,
105 #endif
106 #ifdef CONFIG_MUSEPACK
107 &mpcodecs_ad_libmusepack,
108 #endif
109 #ifdef CONFIG_LIBDCA
110 &mpcodecs_ad_libdca,
111 #endif
112 NULL