ext/ffmpeg/gstffmpegdemux.c: Don't cripple rank as a hack to not register typefind...
authorRonald S. Bultje <rbultje@ronald.bitfreak.net>
Sat, 25 Dec 2004 13:28:55 +0000 (13:28 +0000)
committerRonald S. Bultje <rbultje@ronald.bitfreak.net>
Sat, 25 Dec 2004 13:28:55 +0000 (13:28 +0000)
Original commit message from CVS:
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Don't cripple rank as a hack to not register typefind functions.
Instead, just use a boolean for that. This makes ID3-tagged MP3
files play even if mad is not installed.

ChangeLog
ext/ffmpeg/gstffmpegdemux.c

index f0f5d00..02119f0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2004-12-25  Ronald S. Bultje  <rbultje@ronald.bitfreak.net>
+
+       * ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
+         Don't cripple rank as a hack to not register typefind functions.
+         Instead, just use a boolean for that. This makes ID3-tagged MP3
+         files play even if mad is not installed.
+
 2004-12-20  Ronald S. Bultje  <rbultje@ronald.bitfreak.net>
 
        * ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_register):
index dfda037..9765f9e 100644 (file)
@@ -688,6 +688,7 @@ gst_ffmpegdemux_register (GstPlugin * plugin)
     gchar *p, *name = NULL;
     GstCaps *sinkcaps, *audiosrccaps, *videosrccaps;
     gint rank = GST_RANK_MARGINAL;
+    gboolean register_typefind_func = TRUE;
 
     /* no emulators */
     if (!strncmp (in_plugin->long_name, "raw ", 4) ||
@@ -708,7 +709,7 @@ gst_ffmpegdemux_register (GstPlugin * plugin)
         !strcmp (in_plugin->name, "wav") ||
         !strcmp (in_plugin->name, "au") ||
         !strcmp (in_plugin->name, "rm"))
-      rank = GST_RANK_NONE;
+      register_typefind_func = FALSE;
 
     p = name = g_strdup (in_plugin->name);
     while (*p) {
@@ -781,7 +782,7 @@ gst_ffmpegdemux_register (GstPlugin * plugin)
       extensions = NULL;
 
     if (!gst_element_register (plugin, type_name, rank, type) ||
-        (rank != GST_RANK_NONE &&
+        (register_typefind_func == TRUE &&
          !gst_type_find_register (plugin, typefind_name, rank,
              gst_ffmpegdemux_type_find, extensions, sinkcaps, params))) {
       g_warning ("Register of type ffdemux_%s failed", name);