[vlc-commits] [Git][videolan/vlc][master] 4 commits: mmal: remove dead code
Steve Lhomme (@robUx4)
gitlab at videolan.org
Wed Jan 31 11:43:58 UTC 2024
Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
2c6e91b6 by Steve Lhomme at 2024-01-31T11:04:28+00:00
mmal: remove dead code
fmt cannot be NULL as the test above shows.
- - - - -
dac061ac by Steve Lhomme at 2024-01-31T11:04:28+00:00
mmal: remove unneeded test
It should be an assert at best. It's never called with NULL.
- - - - -
3bd22af6 by Steve Lhomme at 2024-01-31T11:04:28+00:00
opengl: remove always true test on libplacebo
We require at least version 192.
- - - - -
051c1c06 by Steve Lhomme at 2024-01-31T11:04:28+00:00
libplacebo: simplify Control switch case
Only one case was handled after fe6ec4ce95ba48ed1bd9b08cd6f95af9d2048a47
- - - - -
3 changed files:
- modules/hw/mmal/vout.c
- modules/video_output/libplacebo/display.c
- modules/video_output/opengl/sampler.c
Changes:
=====================================
modules/hw/mmal/vout.c
=====================================
@@ -539,29 +539,18 @@ static int configure_display(vout_display_t *vd, const video_format_t *fmt)
MMAL_DISPLAYREGION_T display_region;
MMAL_STATUS_T status;
- if (!fmt)
- {
- msg_Err(vd, "Missing cfg & fmt");
- return -EINVAL;
- }
-
isp_check(vd, sys);
- if (fmt) {
- sys->input->format->es->video.par.num = fmt->i_sar_num;
- sys->input->format->es->video.par.den = fmt->i_sar_den;
+ sys->input->format->es->video.par.num = fmt->i_sar_num;
+ sys->input->format->es->video.par.den = fmt->i_sar_den;
- status = mmal_port_format_commit(sys->input);
- if (status != MMAL_SUCCESS) {
- msg_Err(vd, "Failed to commit format for input port %s (status=%"PRIx32" %s)",
- sys->input->name, status, mmal_status_to_string(status));
- return -EINVAL;
- }
- place_dest(vd, fmt);
- } else {
- fmt = vd->source;
- place_dest(vd, vd->source);
+ status = mmal_port_format_commit(sys->input);
+ if (status != MMAL_SUCCESS) {
+ msg_Err(vd, "Failed to commit format for input port %s (status=%"PRIx32" %s)",
+ sys->input->name, status, mmal_status_to_string(status));
+ return -EINVAL;
}
+ place_dest(vd, fmt);
display_region.hdr.id = MMAL_PARAMETER_DISPLAYREGION;
display_region.hdr.size = sizeof(MMAL_DISPLAYREGION_T);
=====================================
modules/video_output/libplacebo/display.c
=====================================
@@ -538,10 +538,6 @@ static int Control(vout_display_t *vd, int query)
switch (query)
{
case VOUT_DISPLAY_CHANGE_DISPLAY_SIZE:
- case VOUT_DISPLAY_CHANGE_DISPLAY_FILLED:
- case VOUT_DISPLAY_CHANGE_SOURCE_ASPECT:
- case VOUT_DISPLAY_CHANGE_SOURCE_CROP:
- case VOUT_DISPLAY_CHANGE_ZOOM: {
/* The following resize should be automatic on most platforms but can
* trigger bugs on some platform with some drivers, that have been seen
* on Windows in particular. Doing it right now enforces the correct
@@ -549,7 +545,6 @@ static int Control(vout_display_t *vd, int query)
* In addition, platforms like Wayland need the call as the size of the
* window is defined by the size of the content, and not the opposite.
* The swapchain creation won't be done twice with this call. */
- if (query == VOUT_DISPLAY_CHANGE_DISPLAY_SIZE)
{
int width = (int) vd->cfg->display.width;
int height = (int) vd->cfg->display.height;
@@ -568,7 +563,11 @@ static int Control(vout_display_t *vd, int query)
*/
}
return VLC_SUCCESS;
- }
+ case VOUT_DISPLAY_CHANGE_DISPLAY_FILLED:
+ case VOUT_DISPLAY_CHANGE_SOURCE_ASPECT:
+ case VOUT_DISPLAY_CHANGE_SOURCE_CROP:
+ case VOUT_DISPLAY_CHANGE_ZOOM:
+ return VLC_SUCCESS;
default:
msg_Err (vd, "Unknown request %d", query);
=====================================
modules/video_output/opengl/sampler.c
=====================================
@@ -825,7 +825,7 @@ opengl_fragment_shader_init(struct vlc_gl_sampler *sampler, bool expose_planes)
const struct pl_shader_res *res = priv->pl_sh_res = pl_shader_finalize(sh);
# if PL_API_VER >= 266
msg_Dbg(priv->gl, "libplacebo shader: %s", res->info->description);
-# elif PL_API_VER >= 151
+# else
msg_Dbg(priv->gl, "libplacebo shader: %s", res->description);
# endif
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/68ad663f85c49d07fc9865f80ef8c7752c929496...051c1c067e7e9f335d14def2b7c41d48880cdb7f
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/68ad663f85c49d07fc9865f80ef8c7752c929496...051c1c067e7e9f335d14def2b7c41d48880cdb7f
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