[vlc-devel] [PATCH] lua/demux: fix pf_demux return values
Thomas Guillem
thomas at gllm.fr
Fri Sep 16 17:55:59 CEST 2016
-1 means VLC_DEMUXER_EGENERIC. Don't trigger an error when the lua demux ends.
---
modules/lua/demux.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/modules/lua/demux.c b/modules/lua/demux.c
index f1b4c0d..acf3509 100644
--- a/modules/lua/demux.c
+++ b/modules/lua/demux.c
@@ -256,7 +256,7 @@ static int Demux( demux_t *p_demux )
{
msg_Warn( p_demux, "Error while running script %s, "
"function parse() not found", psz_filename );
- return VLC_EGENERIC;
+ return VLC_DEMUXER_EGENERIC;
}
if( lua_pcall( L, 0, 1, 0 ) )
@@ -264,7 +264,7 @@ static int Demux( demux_t *p_demux )
msg_Warn( p_demux, "Error while running script %s, "
"function parse(): %s", psz_filename,
lua_tostring( L, lua_gettop( L ) ) );
- return VLC_EGENERIC;
+ return VLC_DEMUXER_EGENERIC;
}
if( lua_gettop( L ) )
@@ -272,7 +272,7 @@ static int Demux( demux_t *p_demux )
else
msg_Err( p_demux, "Script went completely foobar" );
- return -1; /* Needed for correct operation of go back */
+ return VLC_DEMUXER_EOF;
}
static int Control( demux_t *p_demux, int i_query, va_list args )
--
2.9.3
More information about the vlc-devel
mailing list