[vlc-commits] commit: Decomp filter: skip .vlc & .wsz files (skins) ( Jean-Philippe André )
git at videolan.org
git at videolan.org
Mon May 31 08:12:47 CEST 2010
vlc | branch: master | Jean-Philippe André <jpeg at videolan.org> | Mon May 31 13:43:45 2010 +0800| [3acea6444dca179ef35358917b8595e02beeb0e3] | committer: Jean-Philippe André
Decomp filter: skip .vlc & .wsz files (skins)
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=3acea6444dca179ef35358917b8595e02beeb0e3
---
modules/stream_filter/decomp.c | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/modules/stream_filter/decomp.c b/modules/stream_filter/decomp.c
index ec81167..dbca917 100644
--- a/modules/stream_filter/decomp.c
+++ b/modules/stream_filter/decomp.c
@@ -267,6 +267,18 @@ static int Control (stream_t *stream, int query, va_list args)
*/
static int Open (stream_t *stream, const char *path)
{
+ /* Verify file extension: discard .vlt files (skins) */
+ char *psz_ext = strrchr (stream->psz_path, '.');
+ if (psz_ext)
+ {
+ if (!strncasecmp(psz_ext, ".vlt", 4) ||
+ !strncasecmp(psz_ext, ".wsz", 4))
+ {
+ msg_Dbg (stream, "skipping skins package (*.vlt, *.wsz)");
+ return VLC_EGENERIC;
+ }
+ }
+
stream_sys_t *p_sys = stream->p_sys = malloc (sizeof (*p_sys));
if (p_sys == NULL)
return VLC_ENOMEM;
More information about the vlc-commits
mailing list