[MPlayer-dev-eng] [Patch 2/2] dvd_set_speed fixes/addons

Sebastian Kemper sebastian_ml at gmx.net
Fri Nov 16 21:47:55 CET 2007


Sorry, the last patch didn't apply cleanly after
mplayer-set_streaming-fixes.diff. Here's a new one.

Regards
Sebastian
-------------- next part --------------
diff -Nur mplayer.new/stream/stream_dvd.c mplayer.new_new/stream/stream_dvd.c
--- mplayer.new/stream/stream_dvd.c	2007-11-16 21:14:10.000000000 +0100
+++ mplayer.new_new/stream/stream_dvd.c	2007-11-16 21:24:13.000000000 +0100
@@ -48,7 +48,7 @@
   int fd, k;
   unsigned char buffer[28];
   unsigned char cmd[12];
-  unsigned char sense[16];
+  unsigned char sense[32];
   struct sg_io_hdr sghdr;
   struct stat st;
 
@@ -127,7 +127,27 @@
     close(fd);
     return;
   }
-  mp_msg(MSGT_OPEN, MSGL_INFO, MSGTR_DVDlimitOk);
+
+  /* now for the error processing */
+  if ((sghdr.info & SG_INFO_OK_MASK) != SG_INFO_OK) {
+    if (sghdr.sb_len_wr > 0) {
+      printf("SET STREAMING sense data: ");
+      for (k = 0; k < sghdr.sb_len_wr; ++k) {
+        if ((k > 0) && (0 == (k % 10)))
+          printf("\n  ");
+        printf("0x%02x ", sense[k]);
+      }
+      printf("\n");
+    }
+    if (sghdr.masked_status)
+      printf("SET STREAMING SCSI status=0x%x\n", sghdr.status);
+    if (sghdr.host_status)
+      printf("SET STREAMING host_status=0x%x\n", sghdr.host_status);
+    if (sghdr.driver_status)
+      printf("SET STREAMING driver_status=0x%x\n", sghdr.driver_status);
+  }
+  else
+    mp_msg(MSGT_OPEN, MSGL_INFO, MSGTR_DVDlimitOk);
   close(fd);
 #endif
 }


More information about the MPlayer-dev-eng mailing list