From 012beea007c541bf98b4536f17dc539d41a1ceaa Mon Sep 17 00:00:00 2001 From: Guenter Bartsch Date: Wed, 23 Oct 2002 20:22:42 +0000 Subject: fix detection by extension CVS patchset: 2970 CVS date: 2002/10/23 20:22:42 --- src/demuxers/demux_mpeg.c | 25 +++++++------------------ 1 file changed, 7 insertions(+), 18 deletions(-) diff --git a/src/demuxers/demux_mpeg.c b/src/demuxers/demux_mpeg.c index aef586222..d2b24a278 100644 --- a/src/demuxers/demux_mpeg.c +++ b/src/demuxers/demux_mpeg.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: demux_mpeg.c,v 1.82 2002/10/23 10:08:48 jkeil Exp $ + * $Id: demux_mpeg.c,v 1.83 2002/10/23 20:22:42 guenter Exp $ * * demultiplexer for mpeg 1/2 program streams * reads streams of variable blocksizes @@ -43,9 +43,6 @@ #include "demux.h" #include "xineutils.h" -#define VALID_MRLS "stdin,fifo" -#define VALID_ENDS "mpg,mpeg,mpe" - #define NUM_PREVIEW_BUFFERS 150 #define WRAP_THRESHOLD 120000 @@ -1154,15 +1151,6 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str this->stream = stream; this->input = input; - /* Calling register_string() configure valid mrls in configfile */ - (void*) config->register_string(config, "mrl.mrls_mpeg", VALID_MRLS, - _("valid mrls for mpeg demuxer"), - NULL, 20, NULL, NULL); - (void*) config->register_string(config, - "mrl.ends_mpeg", VALID_ENDS, - _("valid mrls ending for mpeg demuxer"), - NULL, 20, NULL, NULL); - this->demux_plugin.send_headers = demux_mpeg_send_headers; this->demux_plugin.start = demux_mpeg_start; this->demux_plugin.seek = demux_mpeg_seek; @@ -1179,7 +1167,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str switch (stream->content_detection_method) { - case XINE_DEMUX_CONTENT_STRATEGY: { + case METHOD_BY_CONTENT: { uint8_t buf[4096]; off_t mdat_atom_offset = -1; int64_t mdat_atom_size = -1; @@ -1297,7 +1285,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str return NULL; } - case XINE_DEMUX_EXTENSION_STRATEGY: { + case METHOD_BY_EXTENSION: { char *ending, *mrl; mrl = input->get_mrl (input); @@ -1309,7 +1297,8 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str return NULL; } - if (strncasecmp(ending, ".MPEG", 4)) { + if (strncasecmp(ending, ".MPEG", 4) + && strncasecmp (ending, ".mpg", 3)) { free (this); return NULL; } @@ -1325,7 +1314,7 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str } static char *get_description (demux_class_t *this_gen) { - return "Mpeg-1 demux plugin"; + return "MPEG program stream demux plugin"; } static char *get_identifier (demux_class_t *this_gen) { @@ -1333,7 +1322,7 @@ static char *get_identifier (demux_class_t *this_gen) { } static char *get_extensions (demux_class_t *this_gen) { - return "mpeg"; + return "mpg mpeg"; } static char *get_mimetypes (demux_class_t *this_gen) { -- cgit v1.2.3