<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body><div style="font-family:helvetica, arial, sans-serif;">On Tue, 8 Aug 2017, at 14:11, Rémi Denis-Courmont wrote:<br></div>
<blockquote type="cite"><div defang_data-gmailquote="yes"><div style="font-family:helvetica, arial, sans-serif;">Le 8 août 2017 12:20:38 GMT+03:00, Jean-Baptiste Kempf <jb@videolan.org> a écrit :<br></div>
<blockquote defang_data-gmailquote="yes" style="margin-top:0pt;margin-right:0pt;margin-bottom:0pt;margin-left:0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204, 204, 204);padding-left:1ex;"><pre><div style="font-family:helvetica, arial, sans-serif;">mpg123 uses long as rate...<br></div>
<div style="font-family:helvetica, arial, sans-serif;">---<br></div>
<div style="font-family:helvetica, arial, sans-serif;"> modules/codec/mpg123.c | 4 ++--<br></div>
<div style="font-family:helvetica, arial, sans-serif;"> 1 file changed, 2 insertions(+), 2 deletions(-)<br></div>
<div style="font-family:helvetica, arial, sans-serif;"><br></div>
<div style="font-family:helvetica, arial, sans-serif;">diff --git a/modules/codec/mpg123.c b/modules/codec/mpg123.c<br></div>
<div style="font-family:helvetica, arial, sans-serif;">index d9e646cb59..171254f707 100644<br></div>
<div style="font-family:helvetica, arial, sans-serif;">--- a/modules/codec/mpg123.c<br></div>
<div style="font-family:helvetica, arial, sans-serif;">+++ b/modules/codec/mpg123.c<br></div>
<div style="font-family:helvetica, arial, sans-serif;">@@ -186,9 +186,9 @@ static int UpdateAudioFormat( decoder_t *p_dec )<br></div>
<div style="font-family:helvetica, arial, sans-serif;"> aout_FormatPrepare( &p_dec->fmt_<a href="http://out.audio">out.audio</a> );<br></div>
<div style="font-family:helvetica, arial, sans-serif;"> <br></div>
<div style="font-family:helvetica, arial, sans-serif;"> /* Date management */<br></div>
<div style="font-family:helvetica, arial, sans-serif;">- if( p_dec->fmt_<a href="http://out.audio">out.audio</a>.i_rate != frame_info.rate )<br></div>
<div style="font-family:helvetica, arial, sans-serif;">+ if( p_dec->fmt_<a href="http://out.audio">out.audio</a>.i_rate != (unsigned int)frame_info.rate )<br></div>
<div style="font-family:helvetica, arial, sans-serif;"> {<br></div>
<div style="font-family:helvetica, arial, sans-serif;">- p_dec->fmt_<a href="http://out.audio">out.audio</a>.i_rate = frame_info.rate;<br></div>
<div style="font-family:helvetica, arial, sans-serif;">+ p_dec->fmt_<a href="http://out.audio">out.audio</a>.i_rate = (unsigned int)frame_info.rate;<br></div>
<div style="font-family:helvetica, arial, sans-serif;"> date_Init( &p_sys->end_date, p_dec->fmt_<a href="http://out.audio">out.audio</a>.i_rate, 1 );<br></div>
<div style="font-family:helvetica, arial, sans-serif;"> date_Set( &p_sys->end_date, 0 );<br></div>
<div style="font-family:helvetica, arial, sans-serif;"> }<br></div>
</pre></blockquote></div>
<div style="font-family:helvetica, arial, sans-serif;"><br></div>
<div style="font-family:helvetica, arial, sans-serif;">This won't work if the rate can be larger than UINT_MAX. I don't know the mpg123 internals.<br></div>
<div style="font-family:helvetica, arial, sans-serif;"><br></div>
<div style="font-family:helvetica, arial, sans-serif;"><br></div>
<div style="font-family:helvetica, arial, sans-serif;"><br></div>
</blockquote><div style="font-family:helvetica, arial, sans-serif;"><br></div>
<div style="font-family:helvetica, arial, sans-serif;">Max rate cannot reach UINT_MAX by 3 or 4 orders of magnitude.<br></div>
<div style="font-family:helvetica, arial, sans-serif;"><br></div>
<div style="font-family:helvetica, arial, sans-serif;"> <br></div>
<div id="sig60240713"><div class="signature">--<br></div>
<div class="signature">Jean-Baptiste Kempf - President<br></div>
<div class="signature">+33 672 704 734<br></div>
<div class="signature"> <br></div>
<div class="signature"><br></div>
</div>
<div style="font-family:helvetica, arial, sans-serif;"><br></div>
</body>
</html>