Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ffmpeg_producer): crash on seek with some formats #1452

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Bohoaush
Copy link

@Bohoaush Bohoaush commented Dec 7, 2022

With some formats, CasparCG would crash when attempting to seek. #1451

@Julusian
Copy link
Member

Julusian commented Dec 7, 2022

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

@Bohoaush
Copy link
Author

Bohoaush commented Dec 9, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants