[MPlayer-cvslog] r31923 - trunk/libmpdemux/demux_ts.c

reimar subversion at mplayerhq.hu
Wed Aug 4 14:38:52 CEST 2010


Author: reimar
Date: Wed Aug  4 14:38:52 2010
New Revision: 31923

Log:
Simplify ts_sync. Might also make it easier to optimize a bit.

Modified:
   trunk/libmpdemux/demux_ts.c

Modified: trunk/libmpdemux/demux_ts.c
==============================================================================
--- trunk/libmpdemux/demux_ts.c	Wed Aug  4 14:23:22 2010	(r31922)
+++ trunk/libmpdemux/demux_ts.c	Wed Aug  4 14:38:52 2010	(r31923)
@@ -1655,16 +1655,13 @@ static int pes_parse2(unsigned char *buf
 
 static int ts_sync(stream_t *stream)
 {
-	int c=0;
-
 	mp_msg(MSGT_DEMUX, MSGL_DBG3, "TS_SYNC \n");
 
-	while(((c=stream_read_char(stream)) != 0x47) && ! stream->eof);
+	while (!stream->eof)
+		if (stream_read_char(stream) == 0x47)
+			return 1;
 
-	if(c == 0x47)
-		return c;
-	else
-		return 0;
+	return 0;
 }
 
 


More information about the MPlayer-cvslog mailing list