[vlc-devel] [PATCH 1/2] mmal/codec: Fix top_field_first flagging

Julian Scheel julian at jusst.de
Fri Oct 10 10:40:07 CEST 2014


The logic setting the top_field_first flag was broken as it evaluated the
actual mode in case of progressive instead of in interlaced case.

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

diff --git a/modules/hw/mmal/codec.c b/modules/hw/mmal/codec.c
index 26e03e1..e778a70 100644
--- a/modules/hw/mmal/codec.c
+++ b/modules/hw/mmal/codec.c
@@ -373,8 +373,8 @@ static int change_output_format(decoder_t *dec)
                 status, mmal_status_to_string(status));
     } else {
         sys->b_progressive = (interlace_type.eMode == MMAL_InterlaceProgressive);
-        sys->b_top_field_first = sys->b_progressive ?
-            (interlace_type.eMode == MMAL_InterlaceFieldsInterleavedUpperFirst) : false;
+        sys->b_top_field_first = sys->b_progressive ? true :
+            (interlace_type.eMode == MMAL_InterlaceFieldsInterleavedUpperFirst);
         msg_Dbg(dec, "Detected %s video", sys->b_progressive ? "progressive" : "interlaced");
     }
 
-- 
2.1.2




More information about the vlc-devel mailing list