]> git.sesse.net Git - vlc/blobdiff - modules/stream_out/raop.c
livehttp: don't remove segment-count to be less than number of segments requested
[vlc] / modules / stream_out / raop.c
index 17c74839d4d042a231e908eaecb74a6e17b9ffc3..7c21e5d4977700e8d38eed15abbd7fbf40d57e77 100644 (file)
@@ -170,7 +170,7 @@ vlc_module_begin();
                   PASSWORD_TEXT, PASSWORD_LONGTEXT, false )
     add_loadfile( SOUT_CFG_PREFIX "password-file", NULL,
               PASSWORD_FILE_TEXT, PASSWORD_FILE_LONGTEXT, false )
-    add_integer_with_range( SOUT_CFG_PREFIX "volume", 100, 0, 255, NULL,
+    add_integer_with_range( SOUT_CFG_PREFIX "volume", 100, 0, 255,
                             VOLUME_TEXT, VOLUME_LONGTEXT, false )
     set_callbacks( Open, Close )
 vlc_module_end()
@@ -1215,7 +1215,7 @@ static int UpdateVolume( vlc_object_t *p_this )
     /* Our volume is 0..255, RAOP is -144..0 (-144 off, -30..0 on) */
 
     /* Limit range */
-    p_sys->i_volume = __MAX( 0, __MIN( p_sys->i_volume, 255 ) );
+    p_sys->i_volume = VLC_CLIP( p_sys->i_volume, 0, 255 );
 
     if ( p_sys->i_volume == 0 )
         d_volume = -144.0;
@@ -1390,11 +1390,11 @@ static int Open( vlc_object_t *p_this )
         goto error;
     }
 
-    p_stream->p_sys = p_sys;
     p_stream->pf_add = Add;
     p_stream->pf_del = Del;
     p_stream->pf_send = Send;
-    p_stream->p_sout->i_out_pace_nocontrol++;
+    p_stream->p_sys = p_sys;
+    p_stream->pace_nocontrol = true;
 
     p_sys->i_control_fd = -1;
     p_sys->i_stream_fd = -1;
@@ -1554,8 +1554,6 @@ static void Close( vlc_object_t *p_this )
     SendTeardown( p_this );
 
     FreeSys( p_this, p_sys );
-
-    p_stream->p_sout->i_out_pace_nocontrol--;
 }