[gst-devel] [PATCH] alsa frequent xruns

Giuliano Pochini pochini at shiny.it
Fri Jul 2 14:20:02 CEST 2004


The following patch fixes the problem I reported a few day ago. With this
patch gstreamer doesn't xrun all the time anymore. I simply moved the
stop/start part inside the if(xrun){}.



--- ext/alsa/gstalsa.c_o        Wed Jun 23 14:31:58 2004
+++ ext/alsa/gstalsa.c  Fri Jul  2 23:13:14 2004
@@ -1264,12 +1264,12 @@
         this->period_count *= 2;
       }
     }
-  }
 
-  if (!(gst_alsa_stop_audio (this) && gst_alsa_start_audio (this))) {
-    GST_ELEMENT_ERROR (this, RESOURCE, FAILED, (NULL),
-        ("Error restarting audio after xrun"));
-    return FALSE;
+    if (!(gst_alsa_stop_audio (this) && gst_alsa_start_audio (this))) {
+      GST_ELEMENT_ERROR (this, RESOURCE, FAILED, (NULL),
+          ("Error restarting audio after xrun"));
+      return FALSE;
+    }
   }
 
   return TRUE;



--
Giuliano.




More information about the gstreamer-devel mailing list