[vlc-commits] dec: move functions up

Thomas Guillem git at videolan.org
Wed Jul 4 09:36:57 CEST 2018


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Wed Jul  4 09:21:11 2018 +0200| [07603d9801172bc4363ed99368db67c13b1293af] | committer: Thomas Guillem

dec: move functions up

Since aout_update_format/vout_update_format functions will need them.

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

 src/input/decoder.c | 84 ++++++++++++++++++++++++++---------------------------
 1 file changed, 42 insertions(+), 42 deletions(-)

diff --git a/src/input/decoder.c b/src/input/decoder.c
index 2c332a9d53..bf5fb7d525 100644
--- a/src/input/decoder.c
+++ b/src/input/decoder.c
@@ -279,6 +279,48 @@ static void DecoderUpdateFormatLocked( decoder_t *p_dec )
     p_owner->b_fmt_description = true;
 }
 
+static void OutputChangePause( decoder_t *p_dec, bool paused, vlc_tick_t date )
+{
+    struct decoder_owner *p_owner = dec_get_owner( p_dec );
+
+    msg_Dbg( p_dec, "toggling %s", paused ? "resume" : "pause" );
+    switch( p_dec->fmt_out.i_cat )
+    {
+        case VIDEO_ES:
+            if( p_owner->p_vout != NULL )
+                vout_ChangePause( p_owner->p_vout, paused, date );
+            break;
+        case AUDIO_ES:
+            if( p_owner->p_aout != NULL )
+                aout_DecChangePause( p_owner->p_aout, paused, date );
+            break;
+        case SPU_ES:
+            break;
+        default:
+            vlc_assert_unreachable();
+    }
+}
+
+static void OutputChangeRate( decoder_t *p_dec, float rate )
+{
+    struct decoder_owner *p_owner = dec_get_owner( p_dec );
+
+    msg_Dbg( p_dec, "changing rate: %f", rate );
+    switch( p_dec->fmt_out.i_cat )
+    {
+        case VIDEO_ES:
+            break;
+        case AUDIO_ES:
+            if( p_owner->p_aout != NULL )
+                aout_DecChangeRate( p_owner->p_aout, rate );
+            break;
+        case SPU_ES:
+            break;
+        default:
+            vlc_assert_unreachable();
+    }
+}
+
 /*****************************************************************************
  * Buffers allocation callbacks for the decoders
  *****************************************************************************/
@@ -1484,48 +1526,6 @@ static void DecoderProcessFlush( decoder_t *p_dec )
     vlc_mutex_unlock( &p_owner->lock );
 }
 
-static void OutputChangePause( decoder_t *p_dec, bool paused, vlc_tick_t date )
-{
-    struct decoder_owner *p_owner = dec_get_owner( p_dec );
-
-    msg_Dbg( p_dec, "toggling %s", paused ? "resume" : "pause" );
-    switch( p_dec->fmt_out.i_cat )
-    {
-        case VIDEO_ES:
-            if( p_owner->p_vout != NULL )
-                vout_ChangePause( p_owner->p_vout, paused, date );
-            break;
-        case AUDIO_ES:
-            if( p_owner->p_aout != NULL )
-                aout_DecChangePause( p_owner->p_aout, paused, date );
-            break;
-        case SPU_ES:
-            break;
-        default:
-            vlc_assert_unreachable();
-    }
-}
-
-static void OutputChangeRate( decoder_t *p_dec, float rate )
-{
-    struct decoder_owner *p_owner = dec_get_owner( p_dec );
-
-    msg_Dbg( p_dec, "changing rate: %f", rate );
-    switch( p_dec->fmt_out.i_cat )
-    {
-        case VIDEO_ES:
-            break;
-        case AUDIO_ES:
-            if( p_owner->p_aout != NULL )
-                aout_DecChangeRate( p_owner->p_aout, rate );
-            break;
-        case SPU_ES:
-            break;
-        default:
-            vlc_assert_unreachable();
-    }
-}
-
 /**
  * The decoding main loop
  *



More information about the vlc-commits mailing list