View Single Post
Old 7th January 2017, 14:50   #21  |  Link
Gavino
Avisynth language lover
 
Join Date: Dec 2007
Location: Spain
Posts: 3,431
Quote:
Originally Posted by StainlessS View Post
I think the SelectEvery(-1) is mistake, should be SelectEvery(1,-1)
Yes, my mistake! (told you it was untested )

The script in the old thread had Loop(2,0,0), but I thought SelectEvery(1,-1) was a better way of expressing it.
Unfortunately, I wrote it wrong.

Quote:
From docs

Both step_size and offset1 are non optional.

Checked source args string, "SelectEvery " = "cii*"
Actually 1 compulsory clip, 1 compulsory int, and zero or more optional int, so maybe it is truly dark magic by the dark lord Gavino
So the docs are strictly speaking incorrect compared to implementation.
If offset1 is omitted, it defaults to zero.
So SelectEvery(-1) is equivalent to SelectEvery(-1, 0), which leads to a divide-by-zero in the filter constructor.
Maybe it should check for rogue input parameters and insist step_size > 0.
__________________
GScript and GRunT - complex Avisynth scripting made easier
Gavino is offline   Reply With Quote