[vlc-devel] [PATCH] mmal/vout: Use framerate from pictures

Julian Scheel julian at jusst.de
Fri Oct 10 10:39:14 CEST 2014


The framerate of pictures might change without a change of the general input
format information. So to ensure that we always handle the correct refreshrate
we compare the refreshrate of each picture with the currently configured one.

Signed-off-by: Julian Scheel <julian at jusst.de>
---
 modules/hw/mmal/vout.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/modules/hw/mmal/vout.c b/modules/hw/mmal/vout.c
index a79ba33..2c4d1a0 100644
--- a/modules/hw/mmal/vout.c
+++ b/modules/hw/mmal/vout.c
@@ -530,6 +530,11 @@ static void vd_display(vout_display_t *vd, picture_t *picture,
     MMAL_BUFFER_HEADER_T *buffer = pic_sys->buffer;
     MMAL_STATUS_T status;
 
+    if (picture->format.i_frame_rate != vd->fmt.i_frame_rate ||
+        picture->format.i_frame_rate_base != vd->fmt.i_frame_rate_base) {
+        configure_display(vd, NULL, &picture->format);
+    }
+
     if (!pic_sys->displayed || !sys->opaque) {
         buffer->cmd = 0;
         buffer->length = sys->input->buffer_size;
-- 
2.1.2




More information about the vlc-devel mailing list