[vlc-devel] commit: Fixed b_out_pace_control value when using record. (Laurent Aimar )

git version control git at videolan.org
Tue Apr 28 19:02:34 CEST 2009


vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Mon Apr 27 20:24:06 2009 +0200| [c691d369d96fc615f2ba9d9a1f6f909e0c73249d] | committer: Laurent Aimar 

Fixed b_out_pace_control value when using record.

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

 src/input/decoder.c |   14 --------------
 src/input/es_out.c  |   18 ++++++++++++++++++
 2 files changed, 18 insertions(+), 14 deletions(-)

diff --git a/src/input/decoder.c b/src/input/decoder.c
index c7bab6e..61ec8c7 100644
--- a/src/input/decoder.c
+++ b/src/input/decoder.c
@@ -1744,20 +1744,6 @@ static void DecoderProcessSout( decoder_t *p_dec, block_t *p_block )
 
             p_sout_block = p_next;
         }
-
-        /* For now it's enough, as only sout impact on this flag */
-        if( p_owner->p_sout->i_out_pace_nocontrol > 0 &&
-            p_owner->p_input->p->b_out_pace_control )
-        {
-            msg_Dbg( p_dec, "switching to sync mode" );
-            p_owner->p_input->p->b_out_pace_control = false;
-        }
-        else if( p_owner->p_sout->i_out_pace_nocontrol <= 0 &&
-                 !p_owner->p_input->p->b_out_pace_control )
-        {
-            msg_Dbg( p_dec, "switching to async mode" );
-            p_owner->p_input->p->b_out_pace_control = true;
-        }
     }
 }
 
diff --git a/src/input/es_out.c b/src/input/es_out.c
index 143e2d5..55416c4 100644
--- a/src/input/es_out.c
+++ b/src/input/es_out.c
@@ -1874,6 +1874,24 @@ static int EsOutSend( es_out_t *out, es_out_id_t *es, block_t *p_block )
         return VLC_SUCCESS;
     }
 
+    /* Check for sout mode */
+    if( out->b_sout )
+    {
+        /* FIXME review this, proper lock may be missing */
+        if( p_input->p->p_sout->i_out_pace_nocontrol > 0 &&
+            p_input->p->b_out_pace_control )
+        {
+            msg_Dbg( p_input, "switching to sync mode" );
+            p_input->p->b_out_pace_control = false;
+        }
+        else if( p_input->p->p_sout->i_out_pace_nocontrol <= 0 &&
+                 !p_input->p->b_out_pace_control )
+        {
+            msg_Dbg( p_input, "switching to async mode" );
+            p_input->p->b_out_pace_control = true;
+        }
+    }
+
     /* Decode */
     if( es->p_dec_record )
     {




More information about the vlc-devel mailing list