ext/ffmpeg/gstffmpegdemux.c: Don't cripple rank as a hack to not register typefind functions.

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.
This commit is contained in:
Ronald S. Bultje 2004-12-25 13:28:55 +00:00
parent dd3c4c4acd
commit 4cf2b8add0
2 changed files with 10 additions and 2 deletions

View file

@ -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):

View 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);