hplayer
hplayer copied to clipboard
Fix: Align destination width to 32 for hardware decoder compatibility
- Modified the calculation of
dwto useFFALIGN(sw, 32)instead ofsw >> 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."