diff options
author | 2012-07-30 18:40:46 +0200 | |
---|---|---|
committer | 2012-07-30 22:14:32 +0200 | |
commit | 1fde09db6f4cee7347842261234082470dd3a2ca (patch) | |
tree | c05bf64b1b397a62e6f0b9cf295a6f9d0266eed2 /libmpdemux/demux_avi.c | |
parent | 17b69493b70413326c95c3c552009626809b45ec (diff) |
Remove some demuxers and decoders
Most of these demuxers and decoders are provided in better form by
libav, while the mplayer builtin ones are essentially unmaintained. The
only legimitate use case for not using the libav ones was working around
libav bugs or bugs related to the way mplayer uses libav. Instead of
trying to keep dead code alive, development effort should go into
improving libav or the mplayer libav glue code.
Note that the libav demuxer have been preferred over the mplayer builtin
ones for a while in mplayer2. There were some exceptions: playing DVDs
with dvdnav or playing network sources. (That's because some stream
modules and network.c requested explicit file formats, such as
DEMUXER_TYPE_MPEG_PS, which mapped to builtin demuxers.) With this
commit, they are switched to use libav. One caveat is that the requested
format is not passed to libavformat, instead we rely on the auto probing
to select the correct libav demuxer (see code in demux_open_stream()).
Diffstat (limited to 'libmpdemux/demux_avi.c')
-rw-r--r-- | libmpdemux/demux_avi.c | 39 |
1 files changed, 3 insertions, 36 deletions
diff --git a/libmpdemux/demux_avi.c b/libmpdemux/demux_avi.c index f73648166c..3841cf2736 100644 --- a/libmpdemux/demux_avi.c +++ b/libmpdemux/demux_avi.c @@ -29,7 +29,6 @@ #include "stream/stream.h" #include "demuxer.h" #include "stheader.h" -#include "demux_ogg.h" #include "aviheader.h" extern const demuxer_desc_t demuxer_desc_avi_ni; @@ -862,38 +861,6 @@ static int avi_check_file(demuxer_t *demuxer) } -static demuxer_t* demux_open_hack_avi(demuxer_t *demuxer) -{ - struct MPOpts *opts = demuxer->opts; - sh_audio_t* sh_a; - - demuxer = demux_open_avi(demuxer); - if(!demuxer) return NULL; // failed to open - sh_a = demuxer->audio->sh; - if(demuxer->audio->id != -2 && sh_a) { -#ifdef CONFIG_OGGVORBIS - // support for Ogg-in-AVI: - if(sh_a->format == 0xFFFE) - demuxer = init_avi_with_ogg(demuxer); - else if(sh_a->format == 0x674F) { - stream_t* s; - demuxer_t *od; - s = new_ds_stream(demuxer->audio); - od = new_demuxer(opts, s,DEMUXER_TYPE_OGG,-1,-2,-2,NULL); - if(!demux_ogg_open(od)) { - mp_tmsg( MSGT_DEMUXER,MSGL_ERR,"Unable to open the Ogg demuxer.\n"); - free_stream(s); - demuxer->audio->id = -2; - } else - demuxer = new_demuxers_demuxer(demuxer,od,demuxer); - } -#endif - } - - return demuxer; -} - - const demuxer_desc_t demuxer_desc_avi = { "AVI demuxer", "avi", @@ -904,7 +871,7 @@ const demuxer_desc_t demuxer_desc_avi = { 1, // safe autodetect avi_check_file, demux_avi_fill_buffer, - demux_open_hack_avi, + demux_open_avi, demux_close_avi, demux_seek_avi, demux_avi_control @@ -920,7 +887,7 @@ const demuxer_desc_t demuxer_desc_avi_ni = { 1, // safe autodetect avi_check_file, demux_avi_fill_buffer_ni, - demux_open_hack_avi, + demux_open_avi, demux_close_avi, demux_seek_avi, demux_avi_control @@ -936,7 +903,7 @@ const demuxer_desc_t demuxer_desc_avi_nini = { 1, // safe autodetect avi_check_file, demux_avi_fill_buffer_nini, - demux_open_hack_avi, + demux_open_avi, demux_close_avi, demux_seek_avi, demux_avi_control |