# apply from source tree with patch -p1 -b < ./add_DiSEQ_to_dvbstream.patch
--- ./dvbstream.c	Sun Oct 13 20:44:09 2002
+++ ./dvbstream.c	Thu Sep 11 09:52:09 2003
@@ -103,6 +103,7 @@
 int open_fe(int* fd_frontend,int* fd_sec) {
 
     if((*fd_frontend = open(frontenddev[card],O_RDWR)) < 0){
+	fprintf(stderr,"iii %s",frontenddev[card]);
         perror("FRONTEND DEVICE: ");
         return -1;
     }
@@ -448,6 +449,9 @@
 
   if (argc==1) {
     fprintf(stderr,"Usage: dvbtune [OPTIONS] pid1 pid2 ... pid8\n\n");
+/* '-d' is added by Ivan Gerasimov geri_bul@yahoo.com on 22.02.2003*/
+/* see tune.c for details*/
+    fprintf(stderr,"-d          DiSEQ as integer\n");
     fprintf(stderr,"-i          IP multicast address\n");
     fprintf(stderr,"-r          IP multicast port\n");
     fprintf(stderr,"-o          Stream to stdout instead of network\n");
@@ -476,9 +480,15 @@
   } else {
     npids=0;
     pestype=DMX_PES_OTHER;  // Default PES type
+
+/* '-d' is added by Ivan Gerasimov geri_bul@yahoo.com on 22.02.2003*/
+/* see tune.c for details*/
     for (i=1;i<argc;i++) {
       if (strcmp(argv[i],"-ps")==0) {
         output_type=RTP_PS;
+      } else if (strcmp(argv[i],"-d")==0) {
+        i++;
+	diseqc=atoi(argv[i]);
       } else if (strcmp(argv[i],"-i")==0) {
         i++;
         strcpy(ipOut,argv[i]);
@@ -627,7 +637,7 @@
   }
 
   if (i<0) { exit(i); }
-
+/******************************************************/
   for (i=0;i<npids;i++) {  
     if((fd[i] = open(demuxdev[card],O_RDWR)) < 0){
       fprintf(stderr,"FD %i: ",i);
