hplayer icon indicating copy to clipboard operation
hplayer copied to clipboard

Fix: Align destination width to 32 for hardware decoder compatibility

Open spiderpigpig opened this issue 10 months ago • 0 comments

  • 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."

spiderpigpig avatar Mar 31 '25 06:03 spiderpigpig