Open Bohoaush opened 1 year ago
Hi,
The log said the error was thrown at line 156 of av_producer.cpp so I was able to mitigate the crash by adding catch(ffmpeg::ffmpeg_error_t) block to an already existing try with catch for boost::thread_interrupted&.
Now it will countinue to play what it was playing and write [warning] ffmpeg[seekTOcrash.mpg|0.0000/31.9200] Waiting for audio frame...
(e.g. sending PLAY 1-1 abcd, then PLAY 1-1 efgh SEEK 20 will result in abcd file still playing and said warnings).
I will continue to look into it, but I don't really know c++, so my understanding of what's going on in there is very limited.
Any help much appreciated.
Hi again, I was able to solve the problem by copying the whole try block into my new catch block (see previous comment). I will continue to look into this, but I don't think I am capable of doing a propper fix.
This and possibly crash related to issue 1460 was added in commit b657428
This is the previous threading logic that caught the exception in the commit just before. It still exists in commit b657428 here but no longer catches the error.
I think adding the following catches, which were used to catch this error before, into the catch block mentioned in pull request 1452 would solve the problem.
catch (ffmpeg::ffmpeg_error_t& ex) {
if (auto errn = boost::get_error_info<ffmpeg_errn_info>(ex)) {
if (*errn == AVERROR_EXIT) {
return;
}
}
CASPAR_LOG_CURRENT_EXCEPTION();
} catch (...) {
CASPAR_LOG_CURRENT_EXCEPTION();
}
Expected behaviour
Seek video and start playing
Current behaviour
Crash of CasparCG server - "Aborted (core dumped)" full log bellow
Steps to reproduce
PLAY 1-1 seekTOcrash SEEK 20
Environment
Additional information & resources
c:\apps\ffmpeg\bin\ffplay.exe -ss 20 -i d:\_testing\seekTOcrash.mpg
), I get simillar error "[mp2 @ 0000027706230500] Header missing", but the file seeks and plays with no problem.