[MPlayer-cvslog] CVS: main/libmpdemux demux_ts.c,1.23,1.24

Nico Sabbi CVS syncmail at mplayerhq.hu
Sat Jan 22 13:15:09 CET 2005


CVS change done by Nico Sabbi CVS

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

Modified Files:
	demux_ts.c 
Log Message:
replaced bzero() with memset();  stream_type 0x0f is AAC

Index: demux_ts.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/demux_ts.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- demux_ts.c	25 Nov 2004 22:24:00 -0000	1.23
+++ demux_ts.c	22 Jan 2005 12:15:06 -0000	1.24
@@ -475,7 +475,7 @@
 	req_spid = param->spid;
 
 	has_tables = 0;
-	bzero(pes_priv1, sizeof(pes_priv1));
+	memset(pes_priv1, 0, sizeof(pes_priv1));
 	init_pos = stream_tell(demuxer->stream);
 	mp_msg(MSGT_DEMUXER, MSGL_INFO, "PROBING UP TO %llu, PROG: %d\n", (uint64_t) param->probe, param->prog);
 	while((pos <= init_pos + param->probe) && (! demuxer->stream->eof))
@@ -1065,7 +1065,7 @@
 		uint32_t hdr, l = 0;
 
 		hdr = (p[0] << 24) | (p[1] << 16) | (p[2] << 8) | p[3];
-		if((hdr & 0xfff00000) == 0xfff00000)
+		if(pes_is_aligned && ((hdr & 0xfff00000) == 0xfff00000))
 		{
 			// ADTS AAC shows with MPA layer 4 (00 in the layer bitstream)
 			l = 4 - ((hdr & 0x00060000) >> 17);
@@ -1079,8 +1079,7 @@
 		es->size    = packet_len;
 
 
-		//if((type_from_pmt == 0x0f) || (l == 4)) //see in parse_pmt()
-		if(l==4)
+		if((type_from_pmt == AUDIO_AAC) || (l == 4)) //see in parse_pmt()
 			es->type    = AUDIO_AAC;
 		else
 			es->type    = AUDIO_MP2;
@@ -1574,19 +1573,11 @@
 			case 0x10:
 				pmt->es[idx].type = VIDEO_MPEG4;
 				break;
+			case 0x0f:
 			case 0x11:
 				parse_descriptors(&pmt->es[idx], &es_base[5]);
 				pmt->es[idx].type = AUDIO_AAC;
 				break;
-
-			/*	seems to indicate an AAC in a certain broadcaster's tables, but
-				it's deceiving, so it's commented out
-			case 0x0f:
-				parse_descriptors(&pmt->es[idx], &es_base[5]);
-				pmt->es[idx].type = 0x0f;
-				break;
-			*/
-
 			case 0x1b:
 				pmt->es[idx].type = VIDEO_H264;
 				break;




More information about the MPlayer-cvslog mailing list