Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Development

Reply
 
Thread Tools Search this Thread Display Modes
Old 20th November 2013, 22:31   #41  |  Link
Gavino
Avisynth language lover
 
Join Date: Dec 2007
Location: Spain
Posts: 3,433
Quote:
Originally Posted by StainlessS View Post
Methinks that the Gavino Bonus Points were aimed at Grouchy.
Not really, I just assumed Groucho had copied the example from somewhere else.

The problem with the code is that those variables should just be local variables inside GetFrame, especially since nothing else uses them. Putting them at the class level means that two threads cannot call GetFrame at the same time (on a single instance of the filter) without interfering with each other.
__________________
GScript and GRunT - complex Avisynth scripting made easier

Last edited by Gavino; 20th November 2013 at 22:33.
Gavino is offline   Reply With Quote
Old 21st November 2013, 02:16   #42  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 11,018
Apologies to the Grouchy man, Gavino, you seemed to me to be a Sort of teacher,
no longer. Why would you expect a newbie to consider multi threading, I dont understand that
and I consider myself not a total newbie.
Gavino, methinks you were not at your best there.
Appologies to the Grouchy man (He He).
Bit pissed at the moment, but, will, (god wiilling, [if there is such an object])
arise, again.
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by Guest; 21st November 2013 at 03:50. Reason: 3
StainlessS is offline   Reply With Quote
Old 21st November 2013, 02:26   #43  |  Link
Groucho2004
 
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
Quote:
Originally Posted by StainlessS View Post
Bit pissed at the moment
That's obvious.

For tomorrow when you're sober: How to develop thread safe filters

Last edited by Groucho2004; 21st November 2013 at 10:23.
Groucho2004 is offline   Reply With Quote
Old 21st November 2013, 11:45   #44  |  Link
Gavino
Avisynth language lover
 
Join Date: Dec 2007
Location: Spain
Posts: 3,433
Quote:
Originally Posted by StainlessS View Post
Why would you expect a newbie to consider multi threading, I dont understand that
and I consider myself not a total newbie.
I wouldn't expect a newbie to be aware of the issues, but was flagging it for his attention at some later time.

At a simpler level, there was also the point that variables that were only required inside one function, and not needed to persist, were declared at the class level, which is bad practice regardless of the multithreading issue.
__________________
GScript and GRunT - complex Avisynth scripting made easier
Gavino is offline   Reply With Quote
Reply

Tags
avisynth, c++, compile, dll

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 03:54.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.