[vlc-commits] [Git][videolan/vlc][master] codec: videotoolbox: fix incorrect format display size
Steve Lhomme (@robUx4)
gitlab at videolan.org
Thu Jul 18 05:57:50 UTC 2024
Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
427bbe3f by Marvin Scholz at 2024-07-18T05:30:49+00:00
codec: videotoolbox: fix incorrect format display size
The input sample's CMVideoFormatDescription needs to be created with
visible pixels, not the buffer dimensions. Not doing that causes the
output image buffer to report incorrect visible size when queried with
CVImageBufferGetDisplaySize.
This can cause issues on display/encoding paths that solely rely on
CVBuffer metadata, like AVSampleBufferDisplayLayer or VideoToolbox CVPX
encoding.
Fix #28703
- - - - -
1 changed file:
- modules/codec/videotoolbox/decoder.c
Changes:
=====================================
modules/codec/videotoolbox/decoder.c
=====================================
@@ -1163,8 +1163,8 @@ static int StartVideoToolbox(decoder_t *p_dec)
OSStatus status = CMVideoFormatDescriptionCreate(
kCFAllocatorDefault,
p_sys->codec,
- p_dec->fmt_out.video.i_width,
- p_dec->fmt_out.video.i_height,
+ p_dec->fmt_out.video.i_visible_width,
+ p_dec->fmt_out.video.i_visible_height,
decoderConfiguration,
&p_sys->videoFormatDescription);
if (status)
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/427bbe3f0cafef368711abf2085404794b38c73f
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/427bbe3f0cafef368711abf2085404794b38c73f
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list