server
server copied to clipboard
fix(ffmpeg_producer): crash on seek with some formats
With some formats, CasparCG would crash when attempting to seek. #1451
I don't know enough about ffmpeg apis to be comfortable merging this without knowing why this is erroring, and the potential impact of ignoring these errors for other formats. I don't think it is a good idea to ignore every possible error that ffmpeg may return.
Also, with this change, you are catching an error which is thrown by the FF(
wrapper checking the return type. If it is merged, it should be simplified to not be throwing, and immediately catching and discarding the error
Thank you very much for prompt reaction and constructive comment. Now I have "unwrapped" the lib call from FF instead of catching the error it throws. I don't understand ffmpeg libraries either, but I've spent hours digging through ffmpeg trac tickets, and it looks like ffmpeg throws this error because of receiving an incomplete packet (starts reading packet immediately instead of waiting for new one). I can try to figure out a way to validate the packet before sending it, but it is not easy for me (I'm clearly not a programmer). The ffmpeg and ffplay apps themselves appear to be ignoring this error as well.