[vlc-commits] demux: ps: fix regression in sync test

Francois Cartegnie git at videolan.org
Wed Mar 8 22:29:18 CET 2017


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Wed Mar  8 17:13:15 2017 +0100| [efb51e5f6d295822817488589e466ac9f7421c97] | committer: Francois Cartegnie

demux: ps: fix regression in sync test

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=efb51e5f6d295822817488589e466ac9f7421c97
---

 modules/demux/mpeg/ps.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/demux/mpeg/ps.c b/modules/demux/mpeg/ps.c
index 58c8dcc..0f39e2c 100644
--- a/modules/demux/mpeg/ps.c
+++ b/modules/demux/mpeg/ps.c
@@ -712,8 +712,8 @@ static int ps_pkt_resynch( stream_t *s, bool b_cdxa, bool b_pack )
         }
 
         if( p_peek[0] == 0 && p_peek[1] == 0 && p_peek[2] == 1 &&
-            ( b_pack ) ? ( p_peek[3] == PS_STREAM_ID_PACK_HEADER )
-                       : ( p_peek[3] >= PS_STREAM_ID_END_STREAM ) )
+            p_peek[3] >= PS_STREAM_ID_END_STREAM &&
+            ( !b_pack || p_peek[3] == PS_STREAM_ID_PACK_HEADER ) )
         {
             return vlc_stream_Read( s, NULL, i_skip ) == i_skip ? 1 : -1;
         }



More information about the vlc-commits mailing list