[vlc-commits] [Git][videolan/vlc][master] 3 commits: codec: mediacodec: check helper return code
François Cartegnie (@fcartegnie)
gitlab at videolan.org
Sat Dec 24 15:28:17 UTC 2022
François Cartegnie pushed to branch master at VideoLAN / VLC
Commits:
2d701ece by Francois Cartegnie at 2022-12-24T15:13:02+00:00
codec: mediacodec: check helper return code
- - - - -
7aa62d7a by Francois Cartegnie at 2022-12-24T15:13:02+00:00
codec: mediacodec: apply visible size from CSD
- - - - -
84f13e3a by Francois Cartegnie at 2022-12-24T15:13:02+00:00
codec: mediacodec: set crop offset
- - - - -
1 changed file:
- modules/codec/omxil/mediacodec.c
Changes:
=====================================
modules/codec/omxil/mediacodec.c
=====================================
@@ -132,6 +132,7 @@ typedef struct decoder_sys_t
void *p_surface, *p_jsurface;
unsigned i_angle;
unsigned i_input_width, i_input_height;
+ unsigned i_input_visible_width, i_input_visible_height;
unsigned int i_stride, i_slice_height;
int i_pixel_format;
struct hxxx_helper hh;
@@ -269,13 +270,20 @@ static void HXXXInitSize(decoder_t *p_dec, bool *p_size_changed)
decoder_sys_t *p_sys = p_dec->p_sys;
struct hxxx_helper *hh = &p_sys->video.hh;
unsigned i_w, i_h, i_vw, i_vh;
- hxxx_helper_get_current_picture_size(hh, &i_w, &i_h, &i_vw, &i_vh);
-
- *p_size_changed = (i_w != p_sys->video.i_input_width
- || i_h != p_sys->video.i_input_height);
- p_sys->video.i_input_width = i_w;
- p_sys->video.i_input_height = i_h;
- /* fmt_out video size will be updated by mediacodec output callback */
+ if(hxxx_helper_get_current_picture_size(hh, &i_w, &i_h, &i_vw, &i_vh)
+ == VLC_SUCCESS)
+ {
+ *p_size_changed = (i_w != p_sys->video.i_input_width
+ || i_h != p_sys->video.i_input_height
+ || i_vw != p_sys->video.i_input_visible_width
+ || i_vh != p_sys->video.i_input_visible_height);
+ p_sys->video.i_input_width = i_w;
+ p_sys->video.i_input_height = i_h;
+ p_sys->video.i_input_visible_width = i_vw;
+ p_sys->video.i_input_visible_height = i_vh;
+ /* fmt_out video size will be updated by mediacodec output callback */
+ }
+ else *p_size_changed = false;
}
}
@@ -1196,12 +1204,14 @@ static int Video_ProcessOutput(decoder_t *p_dec, mc_api_out *p_out,
p_dec->fmt_out.video.i_width = i_width;
p_dec->fmt_out.video.i_visible_height =
p_dec->fmt_out.video.i_height = i_height;
+ p_dec->fmt_out.video.i_x_offset = p_out->conf.video.crop_left;
+ p_dec->fmt_out.video.i_y_offset = p_out->conf.video.crop_top;
}
else
{
- p_dec->fmt_out.video.i_visible_width =
+ p_dec->fmt_out.video.i_visible_width = p_sys->video.i_input_visible_width;
p_dec->fmt_out.video.i_width = p_sys->video.i_input_width;
- p_dec->fmt_out.video.i_visible_height =
+ p_dec->fmt_out.video.i_visible_height = p_sys->video.i_input_visible_height;
p_dec->fmt_out.video.i_height = p_sys->video.i_input_height;
msg_Dbg(p_dec, "video size ignored from MediaCodec");
}
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/2cc6bcc880620f6d469c6ee82747b6edabec098b...84f13e3a85e863afb0b456282746c801a5cad813
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/2cc6bcc880620f6d469c6ee82747b6edabec098b...84f13e3a85e863afb0b456282746c801a5cad813
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