[vlc-devel] [PATCH] demux/mpeg: ps: fixup of 1901851

Filip Roséen filip at atch.se
Tue Mar 21 03:02:20 CET 2017


p_sys->i_first_scr is initialized to -1, denoting that no SCR has been
read from the underlying stream. This change is a simple fixup of
the changes introduced by 1901851 (as it lacks the correct comparision
in the relevant if-condition).
---
 modules/demux/mpeg/ps.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/demux/mpeg/ps.c b/modules/demux/mpeg/ps.c
index b4f1afbcec..75d35128da 100644
--- a/modules/demux/mpeg/ps.c
+++ b/modules/demux/mpeg/ps.c
@@ -318,7 +318,7 @@ static int Probe( demux_t *p_demux, bool b_end )
         int64_t i_scr; int dummy;
         if( !b_end && !ps_pkt_parse_pack( p_pkt, &i_scr, &dummy ) )
         {
-            if( p_sys->i_first_scr )
+            if( p_sys->i_first_scr == -1 )
                 p_sys->i_first_scr = i_scr;
         }
         p_sys->b_have_pack = true;
-- 
2.12.0


More information about the vlc-devel mailing list