From: Thomas V. S. <tho...@us...> - 2002-06-05 21:34:06
|
CVS Root: /cvsroot/gstreamer Module: gst-plugins Changes by: thomasvs Date: Wed Jun 05 2002 14:34:03 PDT Log message: easy fix for mpegdemux being lost for Uraeus and me Modified files: gst/mpegstream : gstmpegstream.c Links: http://cvs.sf.net/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins/gst/mpegstream/gstmpegstream.c.diff?r1=1.3&r2=1.4 ====Begin Diffs==== Index: gstmpegstream.c =================================================================== RCS file: /cvsroot/gstreamer/gst-plugins/gst/mpegstream/gstmpegstream.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- gstmpegstream.c 20 Mar 2002 21:44:57 -0000 1.3 +++ gstmpegstream.c 5 Jun 2002 21:33:51 -0000 1.4 @@ -25,9 +25,18 @@ static gboolean plugin_init (GModule *module, GstPlugin *plugin) { - gst_mpeg_parse_plugin_init (module, plugin); - gst_mpeg_demux_plugin_init (module, plugin); - gst_rfc2250_enc_plugin_init (module, plugin); + /* mpegdemux needs the bytestream package */ + if (!gst_library_load ("gstbytestream")) { + gst_info ("mpeg_demux:: could not load support library: 'gstbytestream'\n"); return FALSE; + } + + /* short-circuit here; this is potentially dangerous since if the second + * or third init fails then the whole plug-in will be placed on the register + * stack again and the first _init will be called more than once + * which GType initialization doesn't like */ + if (!gst_mpeg_parse_plugin_init (module, plugin)) return FALSE; + if (!gst_mpeg_demux_plugin_init (module, plugin)) return FALSE; + if (!gst_rfc2250_enc_plugin_init (module, plugin)) return FALSE; return TRUE; } |