1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-22 06:42:03 +00:00
mpv/player
Roland Hieber 194b26536b osc: fix crashes related to field eventresponder being nil
I'm still getting some crashes after issue #3210 was fixed in commit
5beb230690. It's hard to reproduce those
crashes, they happen maybe once a month, so I guess it could be a race
condition. But in any case, I don't see anything wrong in applying some
defensive programming here.

For reference, here is what was happening on 0.23.0-1 from Debian
testing:

  Playing: ytdl://usL5CeP_row
   (+) Video --vid=1 (*) (h264)
    (+) Audio --aid=1 --alang=und (*) (aac)
    [osc]
    [osc] stack traceback:
    [osc]	  @osc.lua:2074: in function 'process_event'
    [osc]	  @osc.lua:2246: in function 'cb'
    [osc]	  mp.defaults:107: in function 'fn'
    [osc]	  mp.defaults:60: in function 'handler'
    [osc]	  mp.defaults:339: in function 'handler'
    [osc]	  mp.defaults:448: in function 'call_event_handlers'
    [osc]	  mp.defaults:485: in function 'dispatch_events'
    [osc]	  mp.defaults:441: in function <mp.defaults:440>
    [osc]	  [C]: in ?
    [osc]	  [C]: in ?
    [osc] Lua error: @osc.lua:2074: attempt to index field 'eventresponder' (a nil value)

Note that the location is different from where issue #3210 happens.

Signed-off-by: Roland Hieber <rohieb@rohieb.name>
2017-01-25 07:58:45 +01:00
..
lua osc: fix crashes related to field eventresponder being nil 2017-01-25 07:58:45 +01:00
audio.c audio: stop being dumb 2017-01-08 14:47:53 +01:00
client.c player: restructure cancel callback 2017-01-18 17:52:05 +01:00
client.h client API: turn mpv_suspend() and mpv_resume() into stubs 2016-11-22 15:54:44 +01:00
command.c command: fix potential crash for script-binding with multi-commands 2017-01-24 12:39:39 +01:00
command.h options: slightly better option update mechanism 2016-09-19 19:51:26 +02:00
configfiles.c player: fix previous commit 2016-10-03 17:16:02 +02:00
core.h player: add prefetching of the next playlist entry 2017-01-18 19:02:50 +01:00
external_files.c ta: remove old and redundant macro 2016-05-17 10:53:14 +02:00
external_files.h
lavfi.c lavfi: shut up false positive compiler warnings 2016-04-26 19:38:51 +02:00
lavfi.h
loadfile.c player: remove --stream-capture option/property 2017-01-21 17:19:01 +01:00
lua.c lua: close directory after reading its entries 2017-01-17 08:22:13 +01:00
main.c player: actually initialize/destroy MPContext.lock 2017-01-22 15:24:13 +01:00
misc.c player: remove --stream-capture option/property 2017-01-21 17:19:01 +01:00
osd.c player: remove dysfunctional edition switching OSD code 2017-01-05 00:07:28 +01:00
playloop.c player: add prefetching of the next playlist entry 2017-01-18 19:02:50 +01:00
screenshot.c cuda: use libavutil functions for copying hw surfaces to memory 2017-01-12 13:59:35 +01:00
screenshot.h
scripting.c scripting: don't call dlclose() on C plugins 2017-01-14 17:14:30 +01:00
sub.c player: enable no-video subtitle display on coverart too 2016-10-31 13:55:32 +01:00
video.c video: support filtering hardware frames via libavfilter 2017-01-16 16:10:39 +01:00