PlayVideo from sub-directory

Started by strazer, Tue 03/05/2005 15:56:57

Previous topic - Next topic

strazer

A user in the german forum 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?

DoorKnobHandle

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?

strazer

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.

DoorKnobHandle

Allright, I always wondered what security danger would be there with just using subdir's...

EDIT: Sorry for that, anyways. I'm tired...

Pumaman

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.

SMF spam blocked by CleanTalk