changeset 10735:8a10d5d0ce86

serious bugs - 1l absinth (changed to absinth against cola inflation)
author alex
date Sun, 31 Aug 2003 18:51:05 +0000
parents b105d7aba10d
children 3e57b9c079b6
files libmpdemux/demux_real.c libmpdemux/demux_ts.c libmpdemux/open.c libmpdemux/stream.c libmpdemux/stream_netstream.c libmpdemux/tvi_v4l2.c
diffstat 6 files changed, 16 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/demux_real.c	Sun Aug 31 18:33:02 2003 +0000
+++ b/libmpdemux/demux_real.c	Sun Aug 31 18:51:05 2003 +0000
@@ -519,14 +519,14 @@
 		// bit 7: 1=last block in block chain
 		// bit 6: 1=short header (only one block?)
 		vpkg_header=stream_read_char(demuxer->stream); --len;
-		mp_dbg(MSGT_DEMUX,MSGL_DBG2, "hdr: %0.2X (len=%d) ",vpkg_header,len);
+		mp_dbg(MSGT_DEMUX,MSGL_DBG2, "hdr: %02X (len=%d) ",vpkg_header,len);
 
 		if (0x40==(vpkg_header&0xc0)) {
 		    // seems to be a very short header
 	    	    // 2 bytes, purpose of the second byte yet unknown
 	    	    int bummer;
 		    bummer=stream_read_char(demuxer->stream); --len;
- 		    mp_dbg(MSGT_DEMUX,MSGL_DBG2,  "%0.2X",bummer);
+ 		    mp_dbg(MSGT_DEMUX,MSGL_DBG2,  "%02X",bummer);
  	    	    vpkg_offset=0;
  		    vpkg_length=len;
 		} else {
@@ -535,7 +535,7 @@
 			// sub-seqnum (bits 0-6: number of fragment. bit 7: ???)
 		        vpkg_subseq=stream_read_char(demuxer->stream);
 	                --len;
-		        mp_dbg(MSGT_DEMUX,MSGL_DBG2,  "subseq: %0.2X ",vpkg_subseq);
+		        mp_dbg(MSGT_DEMUX,MSGL_DBG2,  "subseq: %02X ",vpkg_subseq);
 			vpkg_subseq&=0x7f;
 	            }
 
@@ -543,11 +543,11 @@
 		    // bit 14 is always one (same applies to the offset)
 		    vpkg_length=stream_read_word(demuxer->stream);
 		    len-=2;
-		    mp_dbg(MSGT_DEMUX,MSGL_DBG2, "l: %0.2X %0.2X ",vpkg_length>>8,vpkg_length&0xff);
+		    mp_dbg(MSGT_DEMUX,MSGL_DBG2, "l: %02X %02X ",vpkg_length>>8,vpkg_length&0xff);
 		    if (!(vpkg_length&0xC000)) {
 			vpkg_length<<=16;
 		        vpkg_length|=stream_read_word(demuxer->stream);
-		        mp_dbg(MSGT_DEMUX,MSGL_DBG2, "l+: %0.2X %0.2X ",(vpkg_length>>8)&0xff,vpkg_length&0xff);
+		        mp_dbg(MSGT_DEMUX,MSGL_DBG2, "l+: %02X %02X ",(vpkg_length>>8)&0xff,vpkg_length&0xff);
 	    	        len-=2;
 		    } else
 		    vpkg_length&=0x3fff;
@@ -557,17 +557,17 @@
 		    // _end_ of the packet, so it's equal to fragment size!!!
 		    vpkg_offset=stream_read_word(demuxer->stream);
 	            len-=2;
-		    mp_dbg(MSGT_DEMUX,MSGL_DBG2, "o: %0.2X %0.2X ",vpkg_offset>>8,vpkg_offset&0xff);
+		    mp_dbg(MSGT_DEMUX,MSGL_DBG2, "o: %02X %02X ",vpkg_offset>>8,vpkg_offset&0xff);
 		    if (!(vpkg_offset&0xC000)) {
 			vpkg_offset<<=16;
 		        vpkg_offset|=stream_read_word(demuxer->stream);
-		        mp_dbg(MSGT_DEMUX,MSGL_DBG2, "o+: %0.2X %0.2X ",(vpkg_offset>>8)&0xff,vpkg_offset&0xff);
+		        mp_dbg(MSGT_DEMUX,MSGL_DBG2, "o+: %02X %02X ",(vpkg_offset>>8)&0xff,vpkg_offset&0xff);
 	    	        len-=2;
 		    } else
 		    vpkg_offset&=0x3fff;
 
 		    vpkg_seqnum=stream_read_char(demuxer->stream); --len;
-		    mp_dbg(MSGT_DEMUX,MSGL_DBG2, "seq: %0.2X ",vpkg_seqnum);
+		    mp_dbg(MSGT_DEMUX,MSGL_DBG2, "seq: %02X ",vpkg_seqnum);
 	        }
  		mp_dbg(MSGT_DEMUX,MSGL_DBG2, "\n");
                 mp_dbg(MSGT_DEMUX,MSGL_DBG2, "blklen=%d\n", len);
--- a/libmpdemux/demux_ts.c	Sun Aug 31 18:33:02 2003 +0000
+++ b/libmpdemux/demux_ts.c	Sun Aug 31 18:51:05 2003 +0000
@@ -1199,7 +1199,7 @@
 		if(pmt->es[idx].descr_length > section_bytes - 5)
 		{
 			mp_msg(MSGT_DEMUX, MSGL_ERR, "PARSE_PMT, ES_DESCR_LENGTH TOO LARGE %d > %d, EXIT %d bytes for PMT_ES\n",
-				pmt->es[idx].descr_length, section_bytes - 5);
+				pmt->es[idx].descr_length, section_bytes - 5, section_bytes);
 			return -1;
 		}
 
--- a/libmpdemux/open.c	Sun Aug 31 18:33:02 2003 +0000
+++ b/libmpdemux/open.c	Sun Aug 31 18:51:05 2003 +0000
@@ -477,7 +477,8 @@
 
   // FIXME: to avoid nonsense error messages...
   if (strncmp("tv://", filename, 5) && strncmp("mf://", filename, 5) &&
-    strncmp("vcd://", filename, 6))
+    strncmp("vcd://", filename, 6) && strncmp("dvb://", filename, 6) &&
+    strstr(filename, "://"))
     url = url_new(filename);
   if(url) {
 	if (strcmp(url->protocol, "smb")==0){
@@ -513,7 +514,7 @@
     	    stream->end_pos=len;
 	    return stream;
 #else
-	    mp_msg(MSGT_OPEN,MSGL_ERR,MSGTR_SMBNotCompiled,filename);
+	    mp_msg(MSGT_OPEN,MSGL_ERR,MSGTR_SMBNotCompiled);
 	    return NULL;
 #endif
 	}
--- a/libmpdemux/stream.c	Sun Aug 31 18:33:02 2003 +0000
+++ b/libmpdemux/stream.c	Sun Aug 31 18:51:05 2003 +0000
@@ -152,7 +152,7 @@
   for(i = 0 ; auto_open_streams[i] ; i++) {
     sinfo = auto_open_streams[i];
     if(!sinfo->protocols) {
-      mp_msg(MSGT_OPEN,MSGL_WARN, "Stream type %s have protocols == NULL, it's a bug\n");
+      mp_msg(MSGT_OPEN,MSGL_WARN, "Stream type %s has protocols == NULL, it's a bug\n", sinfo->name);
       continue;
     }
     for(j = 0 ; sinfo->protocols[j] ; j++) {
--- a/libmpdemux/stream_netstream.c	Sun Aug 31 18:33:02 2003 +0000
+++ b/libmpdemux/stream_netstream.c	Sun Aug 31 18:51:05 2003 +0000
@@ -166,7 +166,7 @@
     return NULL;
   }
   
-  mp_msg(MSGT_STREAM,MSGL_ERR, "Unknown response to %d: %d\n",pack->cmd);
+  mp_msg(MSGT_STREAM,MSGL_ERR, "Unknown response to %d: %d\n",cmd,pack->cmd);
   free(pack);
   return NULL;
 }
--- a/libmpdemux/tvi_v4l2.c	Sun Aug 31 18:33:02 2003 +0000
+++ b/libmpdemux/tvi_v4l2.c	Sun Aug 31 18:51:05 2003 +0000
@@ -658,7 +658,7 @@
 #endif
 	return TVI_CONTROL_TRUE;
     case TVI_CONTROL_TUN_GET_TUNER:
-	mp_msg(MSGT_TV, MSGL_V, "%s: get tuner\n");
+	mp_msg(MSGT_TV, MSGL_V, "%s: get tuner\n",info.short_name);
 	if (ioctl(priv->video_fd, VIDIOC_G_TUNER, &priv->tuner) < 0) {
 	    mp_msg(MSGT_TV, MSGL_ERR, "%s: ioctl get tuner failed: %s\n",
 		   info.short_name, strerror(errno));
@@ -666,7 +666,7 @@
 	}
 	return TVI_CONTROL_TRUE;
     case TVI_CONTROL_TUN_SET_TUNER:
-	mp_msg(MSGT_TV, MSGL_V, "%s: set tuner\n");
+	mp_msg(MSGT_TV, MSGL_V, "%s: set tuner\n",info.short_name);
 	if (ioctl(priv->video_fd, VIDIOC_S_TUNER, &priv->tuner) < 0) {
 	    mp_msg(MSGT_TV, MSGL_ERR, "%s: ioctl set tuner failed: %s\n",
 		   info.short_name, strerror(errno));