Closed brabebhin closed 2 years ago
Huh interesting. lock_guard is expected to work with co_await, although it is not recommended for different reasons. Does this happen in the sample app as well? I will look into this when I return from my vacation.
Yes. This is going on in the sample.
Airplane reading. Yes, lock_guard is a synchronous lock. It most likely won't work properly with co_await. This might cause subtle hidden bugs in prod environments. It is equivalent to use lock statements in async blocks in c#.
We should probably switch to manual mutex lock/unlock for async methods.
It is curious why this reproduces easily for adding subtitles but not for others.
hi @lukasf
Just found this bug today, unfortunately, tomorrow is vacation time for 1 week so i don't know if I'll be able to fix it.
This seems to be caused by
line 1277 in FFmpegMediaSource.
I think it may be a compiler bug with the lock_guard not handling the co_await correctly.