[MPlayer-cvslog] CVS: main/libmpdemux demux_ts.c,1.50,1.51

Nico Sabbi CVS syncmail at mplayerhq.hu
Fri May 12 23:34:09 CEST 2006


CVS change done by Nico Sabbi CVS

Update of /cvsroot/mplayer/main/libmpdemux
In directory mail:/var2/tmp/cvs-serv19495

Modified Files:
	demux_ts.c 
Log Message:
don't allocate (and demux_push() immediately) demux_packet()s > MAX_PACK_SIZE; releasing immediately audio packets (before the pes is complete) doesn't make any sense and deteriorates interleaving

Index: demux_ts.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/demux_ts.c,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -r1.50 -r1.51
--- demux_ts.c	12 May 2006 20:26:05 -0000	1.50
+++ demux_ts.c	12 May 2006 21:34:06 -0000	1.51
@@ -2823,6 +2823,8 @@
 
 			if(*dp == NULL)
 			{
+				if(*buffer_size > MAX_PACK_BYTES)
+					*buffer_size = MAX_PACK_BYTES;
 				*dp = new_demux_packet(*buffer_size);	//es->size
 				*dp_offset = 0;
 				if(! *dp)
@@ -2930,7 +2932,7 @@
 						(*dp)->pos = stream_tell(demuxer->stream);
 						(*dp)->pts = es->pts;
 
-				if(is_audio)
+				if(*dp_offset >= MAX_PACK_BYTES)
 				{
 					retv = fill_packet(demuxer, ds, dp, dp_offset, si);
 					return 1;
@@ -3002,7 +3004,7 @@
 				}
 				stream_skip(stream, junk);
 
-				if(is_audio)
+				if(*dp_offset >= MAX_PACK_BYTES)
 				{
 					(*dp)->pts = tss->last_pts;
 					retv = fill_packet(demuxer, ds, dp, dp_offset, si);




More information about the MPlayer-cvslog mailing list