[vlc-commits] access/alsa.c: Simplify demux loop.

Jean-Paul Saman git at videolan.org
Sat Sep 3 10:34:26 CEST 2011


vlc | branch: master | Jean-Paul Saman <jean-paul.saman at m2x.nl> | Mon May 30 14:17:41 2011 +0200| [c2861c61046207e163ee3a74d24df2900bddb6f2] | committer: Jean-Paul Saman

access/alsa.c: Simplify demux loop.
(cherry picked from commit d3dd902828854d30b7b39c5e8147152ec6d63289)

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c2861c61046207e163ee3a74d24df2900bddb6f2
---

 modules/access/alsa.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/modules/access/alsa.c b/modules/access/alsa.c
index 9720a95..a83f1de 100644
--- a/modules/access/alsa.c
+++ b/modules/access/alsa.c
@@ -360,16 +360,14 @@ static int Demux( demux_t *p_demux )
 
     do
     {
+        p_block = GrabAudio( p_demux );
         if( p_block )
         {
+            es_out_Control( p_demux->out, ES_OUT_SET_PCR, p_block->i_pts );
             es_out_Send( p_demux->out, p_sys->p_es, p_block );
             p_block = NULL;
         }
 
-        p_block = GrabAudio( p_demux );
-        if( p_block )
-            es_out_Control( p_demux->out, ES_OUT_SET_PCR, p_block->i_pts );
-
     } while( p_block && p_sys->i_next_demux_date > 0 &&
              p_block->i_pts < p_sys->i_next_demux_date );
 



More information about the vlc-commits mailing list