Jean-Baptiste Kempf pushed to branch master at VideoLAN / VLC
Commits:
e42c6f4d by François Cartegnie at 2026-02-14T11:44:59+01:00
codec: rawvideo: compute visible size from offset
- - - - -
898bd762 by François Cartegnie at 2026-02-14T11:44:59+01:00
es_out: compute visible size from offset
- - - - -
01262e82 by François Cartegnie at 2026-02-14T11:44:59+01:00
es_out: sanitize visible/width/offset
- - - - -
91b5d272 by François Cartegnie at 2026-02-14T11:44:59+01:00
demux: mp4: fully ignore clap when overwritten
- - - - -
3 changed files:
- modules/codec/rawvideo.c
- modules/demux/mp4/essetup.c
- src/input/es_out.c
Changes:
=====================================
modules/codec/rawvideo.c
=====================================
@@ -96,9 +96,9 @@ static int OpenCommon( decoder_t *p_dec )
es_format_Copy( &p_dec->fmt_out, p_dec->fmt_in );
if( !p_dec->fmt_out.video.i_visible_width )
- p_dec->fmt_out.video.i_visible_width = p_dec->fmt_out.video.i_width;
+ p_dec->fmt_out.video.i_visible_width = p_dec->fmt_out.video.i_width -
p_dec->fmt_out.video.i_x_offset;
if( !p_dec->fmt_out.video.i_visible_height )
- p_dec->fmt_out.video.i_visible_height = p_dec->fmt_out.video.i_height;
+ p_dec->fmt_out.video.i_visible_height = p_dec->fmt_out.video.i_height
- p_dec->fmt_out.video.i_y_offset;
if( p_dec->fmt_in->i_codec == VLC_CODEC_YUV2 )
{
=====================================
modules/demux/mp4/essetup.c
=====================================
@@ -798,6 +798,8 @@ int SetupVideoES( demux_t *p_demux, const mp4_track_t
*p_track, const MP4_Box_t
p_fmt->video.i_visible_width = p_fmt->video.i_width;
p_fmt->video.i_height = BOXDATA(p_strf)->bmiHeader.biHeight;
p_fmt->video.i_visible_height =p_fmt->video.i_height;
+ p_fmt->video.i_x_offset = 0;
+ p_fmt->video.i_y_offset = 0;
CopyExtradata( BOXDATA(p_strf)->p_extra,
BOXDATA(p_strf)->i_extra,
p_fmt );
=====================================
src/input/es_out.c
=====================================
@@ -2206,10 +2206,31 @@ static void EsOutFillEsFmt(es_out_sys_t *p_sys,
es_format_t *fmt)
case VIDEO_ES:
fmt->i_codec = vlc_fourcc_GetCodec( fmt->i_cat, fmt->i_codec );
+ // first sanitize some values
+ if( fmt->video.i_visible_width )
+ {
+ if( fmt->video.i_visible_width > fmt->video.i_width )
+ fmt->video.i_visible_width = fmt->video.i_width;
+ if( fmt->video.i_x_offset > fmt->video.i_width -
fmt->video.i_visible_width )
+ fmt->video.i_x_offset = fmt->video.i_width -
fmt->video.i_visible_width;
+ } else if( fmt->video.i_x_offset > fmt->video.i_width ) {
+ fmt->video.i_x_offset = fmt->video.i_width;
+ }
+
+ if( fmt->video.i_visible_height )
+ {
+ if( fmt->video.i_visible_height > fmt->video.i_height )
+ fmt->video.i_visible_height = fmt->video.i_height;
+ if( fmt->video.i_y_offset > fmt->video.i_height -
fmt->video.i_visible_height )
+ fmt->video.i_y_offset = fmt->video.i_height -
fmt->video.i_visible_height;
+ } else if( fmt->video.i_y_offset > fmt->video.i_height ) {
+ fmt->video.i_y_offset = fmt->video.i_height;
+ }
+
if( !fmt->video.i_visible_width || !fmt->video.i_visible_height )
{
- fmt->video.i_visible_width = fmt->video.i_width;
- fmt->video.i_visible_height = fmt->video.i_height;
+ fmt->video.i_visible_width = fmt->video.i_width -
fmt->video.i_x_offset;
+ fmt->video.i_visible_height = fmt->video.i_height -
fmt->video.i_y_offset;
}
if( fmt->video.i_frame_rate && fmt->video.i_frame_rate_base )
View it on GitLab:
https://code.videolan.org/videolan/vlc/-/compare/61c5a923b012518ac862bb27ef347258e5754e2b...91b5d272c757cd30954ff03e586a2b9954b67b7c
--
View it on GitLab:
https://code.videolan.org/videolan/vlc/-/compare/61c5a923b012518ac862bb27ef347258e5754e2b...91b5d272c757cd30954ff03e586a2b9954b67b7c
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits