oggdemux: Solidify gst_ogg_demux_loop_push() some more
authorEdward Hervey <edward@centricular.com>
Wed, 8 Nov 2017 16:15:09 +0000 (17:15 +0100)
committerEdward Hervey <bilboed@bilboed.com>
Wed, 8 Nov 2017 16:51:52 +0000 (17:51 +0100)
commit895d8847015cfcb2a4924c7ea5e785d8de377705
treeb75fa2509ca33759f77a778fc93f1bc51ee6dc21
parent9f678bb27fe8933b5a6572a3243380929e49b3bd
oggdemux: Solidify gst_ogg_demux_loop_push() some more

There were still some races going on where seeking events wouldn't
be properly intercepted/executed by this thread.

* Instead of always waiting for the GCond to be emitted, first just
  check if there is an event available
* Take ownership of the event *while* the lock is taken and not
  after releasing/reacquiring it
* Finally acquire lock at the very top and release it at the end
  to make it a bit more streamlined

This removes the remaining issues with seeks not being executed
ext/ogg/gstoggdemux.c