Closed Chaojimengnan closed 1 year ago
https://github.com/KikoPlayProject/KikoPlay/blob/0afa45e901f33f7ac42d1bdb0c9c246d414c535d/Play/Video/mpvplayer.cpp#L789-L795
The lambda in the propertyFunc will only capture the event when the propertyFunc is first initialized, which results in undefined behavior. Passing event as an argument to lambda will fix this bug.
propertyFunc
event
确实是潜在的问题,不过似乎libmpv不会为mpv_event重新分配内存,也就表现正常
https://github.com/KikoPlayProject/KikoPlay/blob/0afa45e901f33f7ac42d1bdb0c9c246d414c535d/Play/Video/mpvplayer.cpp#L789-L795
The lambda in the
propertyFunc
will only capture theevent
when thepropertyFunc
is first initialized, which results in undefined behavior. Passingevent
as an argument to lambda will fix this bug.