Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: strazer on Tue 03/05/2005 15:56:57

Title: PlayVideo from sub-directory
Post by: strazer on Tue 03/05/2005 15:56:57
A user in the german forum (http://www.adventure-treff.de/forum/viewtopic.php235) reported a problem playing a video from a sub-directory:

  PlayVideo("Videos\x.avi", 1, 0);

works on his comp, other people get

  "File not found or [...] compiled/videos\x.avi"

Changing it to

  PlayVideo("Videos/x.avi", 1, 0);

works on the other comp, but he gets

  "File not found or [...] compiled/videos/x.avi"

He then tested it on various Windows XP systems and on some it works, on some it doesn't.

Any thoughts?
Title: Re: PlayVideo from sub-directory
Post by: DoorKnobHandle on Tue 03/05/2005 18:21:20
Wait. I might be wrong here, but I thought AGS was supposed to not be able to open files from any other directory than the one with the game file in it? For security reasons?
Title: Re: PlayVideo from sub-directory
Post by: strazer on Tue 03/05/2005 18:31:50
The video files reside in a sub-directory of the folder the game is in.
AFAIK no absolute paths are allowed. No security risk I can see.
Title: Re: PlayVideo from sub-directory
Post by: DoorKnobHandle on Tue 03/05/2005 18:37:28
Allright, I always wondered what security danger would be there with just using subdir's...

EDIT: Sorry for that, anyways. I'm tired...
Title: Re: PlayVideo from sub-directory
Post by: Pumaman on Tue 03/05/2005 20:44:31
Strange, both / and \ should work as paths in Windows. It might be some sort of peculiarity of the DirectShow functions that AGS uses to play video, but I don't know why it would be different on two different Windows installations.

As a workaround, just don't use the subdirectory.