gnash-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnash-dev] Re: Burning 100% CPU time: MediaParser/FLVParser never p


From: strk
Subject: Re: [Gnash-dev] Re: Burning 100% CPU time: MediaParser/FLVParser never pauses
Date: Sat, 7 Aug 2010 22:53:40 +0200

On Thu, Aug 05, 2010 at 07:46:33PM -0700, John Gilmore wrote:
> This patch seems to fix this problem in gnash:
> 
> === modified file 'libmedia/MediaParser.cpp'
> --- libmedia/MediaParser.cpp  2010-01-01 17:48:26 +0000
> +++ libmedia/MediaParser.cpp  2010-08-06 02:34:19 +0000
> @@ -411,7 +411,10 @@
>       while (!parserThreadKillRequested())
>       {
>               parseNextChunk();
> -             gnashSleep(100); // no rush....
> +             {
> +                     boost::mutex::scoped_lock lock(_qMutex);
> +                     waitIfNeeded(lock);
> +             }
>       }
>  }

I think 'parseNextChunk' is supposed to call waitIfNeeded, but
it's been a long time...
Most likely doumentation (comments) are correct, so code should
follow as needed.
Make sure to try both ffmpeg and gst media handlers, as if I recall
correctly some locking duty were given to these implementations
rather than left to base class.


--strk;

  ()   Free GIS & Flash consultant/developer
  /\   http://strk.keybit.net/services.html



reply via email to

[Prev in Thread] Current Thread [Next in Thread]