Closed kornelski closed 10 months ago
If a user complains that they're hitting a panic when transcoding zero-sized frames, "compile in release mode" feels like the wrong advice to give. Perhaps instead assert in all modes, but add a allow_zero_size_frames
(or similar) method that disables the assert?
My suggestion would be "filter out 0-sized frames before passing them to the encoder". They don't serve any purpose, so I think it should be on the callers to weed them out.
There are probably real-world broken GIF files with 0-sized frames, and this could affect users transcoding such files, so I don't want to make it a hard error. But it may be a debug assert, catching programming errors, and making handling of it the application's problem.
Fixes #135