Revert "Fixed deadlock when no data are received in rtp."
authorRémi Denis-Courmont <rdenis@simphalempin.com>
Thu, 27 Nov 2008 15:54:22 +0000 (17:54 +0200)
committerRémi Denis-Courmont <rdenis@simphalempin.com>
Thu, 27 Nov 2008 17:12:56 +0000 (19:12 +0200)
This reverts commit a34f07303469b45915a359273ff17143baa0c73d.

modules/access/rtp/input.c

index dc1110b..0cfa406 100644 (file)
@@ -196,9 +196,10 @@ void rtp_process (demux_t *demux)
     mtime_t deadline = INT64_MAX;
 
     vlc_mutex_lock (&p_sys->lock);
-    if (!rtp_dequeue (demux, p_sys->session, &deadline))
-        deadline = mdate () + CLOCK_FREQ / 5;
-    vlc_cond_timedwait (&p_sys->wait, &p_sys->lock, deadline);
+    if (rtp_dequeue (demux, p_sys->session, &deadline))
+        /* Pace the demux thread */
+        vlc_cond_timedwait (&p_sys->wait, &p_sys->lock, deadline);
+    else
+        vlc_cond_wait (&p_sys->wait, &p_sys->lock);
     vlc_mutex_unlock (&p_sys->lock);
 }
-