vlc | branch: master | Julian Scheel <[email protected]> | Thu Oct 9 14:49:40 2014 +0200| [9ccd69b27f431d6f0600e09dab1f78b0aad26e1e] | committer: Jean-Baptiste Kempf
mmal/vout: Use current pictures format for rate matching Instead of using the video_format which was set on output creation, always check the refreshrate against the current pictures frame duration. Signed-off-by: Julian Scheel <[email protected]> Signed-off-by: Jean-Baptiste Kempf <[email protected]> > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=9ccd69b27f431d6f0600e09dab1f78b0aad26e1e --- modules/hw/mmal/vout.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/hw/mmal/vout.c b/modules/hw/mmal/vout.c index c23f463..a79ba33 100644 --- a/modules/hw/mmal/vout.c +++ b/modules/hw/mmal/vout.c @@ -144,7 +144,7 @@ static void input_port_cb(MMAL_PORT_T *port, MMAL_BUFFER_HEADER_T *buffer); static int query_resolution(vout_display_t *vd, unsigned *width, unsigned *height); static void tvservice_cb(void *callback_data, uint32_t reason, uint32_t param1, uint32_t param2); -static void adjust_refresh_rate(vout_display_t *vd); +static void adjust_refresh_rate(vout_display_t *vd, const video_format_t *fmt); static int set_latency_target(vout_display_t *vd, bool enable); /* DispManX */ @@ -412,7 +412,7 @@ static int configure_display(vout_display_t *vd, const vout_display_cfg_t *cfg, show_background(vd, cfg->is_fullscreen); sys->adjust_refresh_rate = var_InheritBool(vd, MMAL_ADJUST_REFRESHRATE_NAME); if (sys->adjust_refresh_rate) { - adjust_refresh_rate(vd); + adjust_refresh_rate(vd, fmt); set_latency_target(vd, true); } @@ -754,12 +754,12 @@ static int set_latency_target(vout_display_t *vd, bool enable) return VLC_SUCCESS; } -static void adjust_refresh_rate(vout_display_t *vd) +static void adjust_refresh_rate(vout_display_t *vd, const video_format_t *fmt) { TV_DISPLAY_STATE_T display_state; TV_SUPPORTED_MODE_NEW_T supported_modes[VC_TV_MAX_MODE_IDS]; int num_modes; - double frame_rate = (double)vd->fmt.i_frame_rate / vd->fmt.i_frame_rate_base; + double frame_rate = (double)fmt->i_frame_rate / fmt->i_frame_rate_base; int best_id = -1; double best_score, score; int i; _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
