[vlc-devel] Open() on a video filter gets called twice...

Rémi Denis-Courmont remi at remlab.net
Tue May 26 22:50:13 CEST 2015

Le mardi 26 mai 2015, 06:48:54 Peter Tap a écrit :
> Two questions:
> 1. Why does VLC call OpenVideo() once again when the media file is stopped?

I don´t know. Look at the verbose VLC logs. Put a breakpoint and check the 
code path in the debugger. Read the source code...

> 2. For now, I am using a global static counter in my code. The counter gets
> incremented each time OpenVideo is called. If the counter value is odd, I
> proceed with my logic. Otherwise, I simply return VLC_EGENERIC. This seems
> to work. However, I am thinking this is not really good programming. Is
> there a better way?

A better way for what? It is a good way to make your plugin fail consistently 
every second time, assuming you have proper synchronization.

Rémi Denis-Courmont
Remlab T:mi

More information about the vlc-devel mailing list