What i'm trying to do is making a plugin to load subtitles every 10 seconds, that is even if i change the subtitles in the srt file while streaming the video, then the changed srt will appear as subititles rather than the old one.
I tried using callback before, but it didn't work, but now i'm trying this using a loop such that, i'm calling add_subtitles() followed by sleep(10) inside the loop. What this is doing is loading a particular subtitles file i mention, then after the sleep time is over, the subtitles are loaded again using the add_subtitles function inside the loop.
This is somewhat working, but the problem is as the subtitles are loaded on the video, VLC is throwing a dialogue box after few seconds which reads, Extension "MyPlugin.lua" has stopped working. Click Yes to Kill the process. But in the background subtitles are being displayed just fine.
I don't know how to rectify this. If i click yes, VLC shuts, if i cancel the box, VLC still shuts.
Please help me. I'm onto something, this is just early testing for what i'm trying to build.
A little help wil be appreciated.
Thanks.
Regards,
Siddhant.