[vlc-devel] [PATCH 1/2] mpg123: fix sign comparison about rate

Jean-Baptiste Kempf jb at videolan.org
Tue Aug 8 11:20:38 CEST 2017


mpg123 uses long as rate...
---
 modules/codec/mpg123.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/codec/mpg123.c b/modules/codec/mpg123.c
index d9e646cb59..171254f707 100644
--- a/modules/codec/mpg123.c
+++ b/modules/codec/mpg123.c
@@ -186,9 +186,9 @@ static int UpdateAudioFormat( decoder_t *p_dec )
     aout_FormatPrepare( &p_dec->fmt_out.audio );
 
     /* Date management */
-    if( p_dec->fmt_out.audio.i_rate != frame_info.rate )
+    if( p_dec->fmt_out.audio.i_rate != (unsigned int)frame_info.rate )
     {
-        p_dec->fmt_out.audio.i_rate = frame_info.rate;
+        p_dec->fmt_out.audio.i_rate = (unsigned int)frame_info.rate;
         date_Init( &p_sys->end_date, p_dec->fmt_out.audio.i_rate, 1 );
         date_Set( &p_sys->end_date, 0 );
     }
-- 
2.13.3



More information about the vlc-devel mailing list