Skip to content
  • Piotr Brzeziński's avatar
    examples/tutorials: fix macOS run() wrapper terminating too early · 446bb7ec
    Piotr Brzeziński authored and GStreamer Marge Bot's avatar GStreamer Marge Bot committed
    Using terminate() kills the whole process instead of just stopping the event loop, so we're back to the 'old' way.
    However, if the provided function finishes too early, that can also fail (will call stop() on a not-yet-running NSApp).
    Creating a delegate and waiting for the callback makes sure NSApp is running before the actual main() is called.
    
    Also, for whatever reason only tutorials were changed to use terminate(). Now both tutorials and examples are
    using identical code.
    
    Part-of: <!1378>
    446bb7ec