[PATCH] get modules filter optarg working

Hans-Peter Jansen hpj at urpla.net
Sun Jan 20 00:57:14 CET 2002

Hi videolan gang,

I played with vlc HEAD today to check out the new funky stuff.

Well, the doc is very sparse on the new options and especially their 
optargs. Fortunately I'm subscribed here ;-)

While playing with the --filter deinterlace/distort/transform options, 
I came across this:

filter error: no valid deinterlace mode provided, using deinterlace:bob

but trying to specify --filter deinterlace:bob failed.

module error: requested video output module `deinterlace:bob' not found
vout error: no suitable vout module
vpar error: can't open vout, aborting

After altering

--- src/misc/modules.c.orig     Sat Jan 19 23:58:40 2002
+++ src/misc/modules.c  Sat Jan 19 23:50:37 2002
@@ -268,6 +268,21 @@
 module_t * module_Need( int i_capability, char *psz_name, probedata_t *p_data )
     module_t * p_module;
+    char *psz_tmp = NULL;
+    if (psz_name)
+    {
+        char *p;
+        psz_tmp = strdup(psz_name);
+        if (psz_tmp)
+        {
+            p = strchr(psz_tmp, ':');
+            if (p)
+                *p = '\0';
+        }
+        psz_name = psz_tmp;
+    }
     /* We take the global lock */
     vlc_mutex_lock( &p_module_bank->lock );
@@ -428,6 +443,9 @@
     /* We can release the global lock, module refcount was incremented */
     vlc_mutex_unlock( &p_module_bank->lock );
+    if (psz_tmp)
+        free(psz_tmp);
     if( p_module != NULL )

it works like a charm :-)

The patch is pretty straight forward: when trying to match a plugin,
cut off optargs temporarily.

I'm not sure, how it could work for others before, did it?
Btw, Sam, distort:ripple is really cool!

Beside this, the only problem, I've found so far:
vlc is loosing it's audio stream after pushing the right arrow key
a few times (playing a plain mpeg2 file):

input: seeking position 35646547/1073709056 (0:00:42/0:21:18)
Garbage at input (7a24c41e)
Garbage at input (38a42a4e)
input: unwanted packet received with start code 0x0000010c
MPEG2NonIntra coeff is out of bound
MPEG2NonIntra coeff is out of bound
MPEG2NonIntra coeff is out of bound
vpar synchro warning: dts != current_pts (21781)

And sound stops. Well known problem?

Keep on with your cool work, guys && thanks a lot


This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
To unsubscribe, please read http://www.videolan.org/lists.html

More information about the vlc-devel mailing list