When there's no media to parse (_parsingComplete) is true, the media
thread loops forever, doing 100 usec nanosleeps and nothing else.
Instead it should wait to be restarted by the main thread when some
other media needs parsing.

It is in this state after a YouTube video finishes, for example.

It's a straight loop from MediaParser::parserLoop to
FLVParser::parseNextChunk to FLVParser::parseNextTag, which returns
almost immediately if _parsingComplete is set.  And around we go again.

I'm not sure of the right place to insert the wait -- perhaps someone
who's groveled around in this code before could advise, or patch?

There's a routine called waitIfNeeded that isn't called in this loop.

The MediaParser.h file says parseNextChunk puts frames on the queue,
"which may trigger the thread to sleep when queues are full or parsing
completed", but that doesn't happen.

        John



_______________________________________________
Gnash-dev mailing list
Gnash-dev@gnu.org
http://lists.gnu.org/mailman/listinfo/gnash-dev

Reply via email to