Skip to content

Conversation

@jsouter
Copy link

@jsouter jsouter commented Jun 27, 2025

With the mjpeg codec in use at Diamond, we have been seeing the following crash:

Assertion ((src_linesize) >= 0 ? (src_linesize) : (-(src_linesize))) >= bytewidth failed at src/libavutil/imgutils.c:350

for 8 bit mono images when entering the logic block that returns early from formatArray without performing sws_scale. This crash did not occur before the deprecated API calls were replaced. With some quick benchmarks on my workstation I couldn't see any appreciable change in cpu usage when bypassing this logic, @coretl and I discussed that the simplest solution may be to just scale all images to prevent this crash, though if there are other suggestions I can amend this - for the specific codec I have been testing with the crash can be avoided by setting the stride variable to 2 or 1.

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.

1 participant