]> git.sesse.net Git - vlc/commitdiff
Fixed b_out_pace_control value when using record.
authorLaurent Aimar <fenrir@videolan.org>
Mon, 27 Apr 2009 18:24:06 +0000 (20:24 +0200)
committerLaurent Aimar <fenrir@videolan.org>
Tue, 28 Apr 2009 16:59:41 +0000 (18:59 +0200)
src/input/decoder.c
src/input/es_out.c

index c7bab6eb16f4f5414bdde5e3fe4f65fe7d0f526e..61ec8c7a647991401e07ace45165afc63ac2ed09 100644 (file)
@@ -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;
-        }
     }
 }
 
index 143e2d5151e032f42afbc4eb7b43924272dd1800..55416c4de1c8da71bc24892bfc1cf777a4c3552f 100644 (file)
@@ -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 )
     {