Eisa01 / mpv-scripts

This repository contain scripts I have made for mpv media player...
BSD 2-Clause "Simplified" License
504 stars 35 forks source link

SimpleHistory: mpv crashes when loading new file while seeking #72

Closed LampPrinter closed 1 year ago

LampPrinter commented 1 year ago

Very weird issue.

To replicate, when you are about to reach the end of file, try a fast swipe to the right to seek forward. Or just keep holding the RIGHT key. MPV would crash. If you do not swipe forward and let the video end normally, MPV does not crash and next file loads automatically.

I have removed all scripts and it only happens with SimpleHistory. If I remove SimpleHistory, it works fine.

Eisa01 commented 1 year ago

Can you provide me with the error log

LampPrinter commented 1 year ago

Can you provide me with the error log

Playing: /Users/xyz/My Files/Torrents/High.Tension.2003.DC.1080p.BluRay.x264-nikt0.mp4
 (+) Video --vid=1 (*) (h264 1920x1080 23.976fps)
 (+) Audio --aid=1 --alang=eng (*) (ac3 6ch 48000Hz)
     Audio --aid=2 --alang=eng (ac3 2ch 48000Hz)
 (+) Subs  --sid=1 --slang=eng (*) (mov_text)
File tags:
 Title: High.Tension.2003.DC.1080p.BluRay.x264-nikt0
[auto_profiles] Applying auto profile: Video
[auto_profiles] Applying auto profile: save-pos-for-long-videos
Track switched:
 (+) Video --vid=1 (*) (h264 1920x1080 23.976fps)
 (+) Audio --aid=1 --alang=eng (*) (ac3 6ch 48000Hz)
     Audio --aid=2 --alang=eng (ac3 2ch 48000Hz)
 (+) Subs  --sid=1 --slang=eng (*) (mov_text)
[select_eng_sub] setting sub 1
[autosub] Reactivate external subtitle files:
Track list:
 (+) Video --vid=1 (*) (h264 1920x1080 23.976fps)
 (+) Audio --aid=1 --alang=eng (*) (ac3 6ch 48000Hz)
     Audio --aid=2 --alang=eng (ac3 2ch 48000Hz)
 (+) Subs  --sid=1 --slang=eng (*) (mov_text)
[autosub] English embedded subtitles active
[autosub] => NOT downloading new subtitles
[SimpleHistory] Added the below into history
[SimpleHistory] High.Tension.2003.DC.1080p.BluRay.x264-nikt0.mp4  🕒  00:00:00.000
Using hardware decoding (videotoolbox).
AO: [coreaudio] 48000Hz stereo 2ch floatp
VO: [libmpv] 1920x1080 videotoolbox[nv12]
AV: 01:30:44 / 01:30:44 (100%) A-V:  0.000
[--------------------------------------------------------------------------------+]
[auto_profiles] Applying auto profile: exit-fullscreen-at-eof
AV: 01:30:44 / 01:30:44 (100%) A-V:  0.000
[--------------------------------------------------------------------------------+]
[SimpleHistory] Added the below into history
[SimpleHistory] High.Tension.2003.DC.1080p.BluRay.x264-nikt0.mp4  🕒  00:00:00.000

Assertion failed: (mpctx->stop_play), function play_current_file, file loadfile.c, line 1785.
zsh: abort      /Applications/mpv.app/Contents/MacOS/mpv
Eisa01 commented 1 year ago

It seems to be a limitation that a function (if it is heavy) couldn't be loaded fully when using on_unload hook. It is a tough one, I will see if there is a workaround.

Eisa01 commented 1 year ago

Try the new version and let me know if it fixes it for you

LampPrinter commented 1 year ago

Try the new version and let me know if it fixes it for you

Fixed 👍.