[vlc-commits] [Git][videolan/vlc][master] avsb: fix timings being reported after a stop
Steve Lhomme (@robUx4)
gitlab at videolan.org
Wed Jul 3 15:19:22 UTC 2024
Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
fb0aa3de by Thomas Guillem at 2024-07-03T13:03:49+00:00
avsb: fix timings being reported after a stop
>From the removeTimeObserver documentation:
"Upon return, the caller is guaranteed that no new time observer blocks
will begin executing. Depending on the calling thread and the queue used
to add the time observer, an in-flight block may continue to execute
after this method returns. You can guarantee synchronous time observer
removal by enqueuing the call to removeTimeObserver: on that queue. Call
dispatch_sync after removeTimeObserver: to wait for any in-flight blocks
to finish executing."
- - - - -
1 changed file:
- modules/audio_output/apple/avsamplebuffer.m
Changes:
=====================================
modules/audio_output/apple/avsamplebuffer.m
=====================================
@@ -310,6 +310,10 @@ customBlock_Free(void *refcon, void *doomedMemoryBlock, size_t sizeInBytes)
_sync.rate = 0.0f;
[_sync removeTimeObserver:_observer];
+ /* From the doc: "Call dispatch_sync after removeTimeObserver: to wait for
+ * any in-flight blocks to finish executing." */
+ dispatch_sync(_timeQueue, ^{});
+
[_renderer stopRequestingMediaData];
[_renderer flush];
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/fb0aa3de80c04b3b6871334b674f42b5875f6c11
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/fb0aa3de80c04b3b6871334b674f42b5875f6c11
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list