Skip to content

Conversation

@spiderpigpig
Copy link

  • Modified the calculation of dw to use FFALIGN(sw, 32) instead of sw >> 2 << 2.
  • Ensured that the destination width is aligned to a multiple of 32, which improves compatibility with hardware decoders (e.g., h264_cuvid).
  • This change resolves potential crashes caused by misaligned resolutions when using sws_scale.

Related logs:

  • Original resolution (888x550) caused crashes due to unaligned width.
  • After alignment, the issue was resolved and the program runs stably."

- Modified the calculation of `dw` to use `FFALIGN(sw, 32)` instead of `sw >> 2 << 2`.
- Ensured that the destination width is aligned to a multiple of 32, which improves compatibility with hardware decoders (e.g., h264_cuvid).
- This change resolves potential crashes caused by misaligned resolutions when using `sws_scale`.

Related logs:
- Original resolution (888x550) caused crashes due to unaligned width.
- After alignment, the issue was resolved and the program runs stably."
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