<html><head></head><body>Hi,<br><br>Not a huge fan of macros that look like constants but aren't. Maybe remove useless cast.<br><br><div class="gmail_quote">Le 27 août 2019 08:27:16 GMT+03:00, Steve Lhomme <robux4@ycbcr.xyz> a écrit :<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<pre class="k9mail"><hr> src/input/decoder.c | 15 +++++++++------<br> 1 file changed, 9 insertions(+), 6 deletions(-)<br><br>diff --git a/src/input/decoder.c b/src/input/decoder.c<br>index c0aa53f04d..b419954bab 100644<br>--- a/src/input/decoder.c<br>+++ b/src/input/decoder.c<br>@@ -109,6 +109,9 @@ struct decoder_owner<br> /* -- Theses variables need locking on read *and* write -- */<br> /* Preroll */<br> vlc_tick_t i_preroll_end;<br>+<br>+#define PREROLL_NONE ((vlc_tick_t) INT64_MIN)<br>+<br> /* Pause & Rate */<br> bool reset_out_state;<br> vlc_tick_t pause_date;<br>@@ -1002,8 +1005,8 @@ static bool DecoderPlayVideo( struct decoder_owner *p_owner, picture_t *p_pictur<br> return false;<br> }<br> <br>- prerolled = p_owner->i_preroll_end > (vlc_tick_t)INT64_MIN;<br>- p_owner->i_preroll_end = (vlc_tick_t)INT64_MIN;<br>+ prerolled = p_owner->i_preroll_end != PREROLL_NONE;<br>+ p_owner->i_preroll_end = PREROLL_NONE;<br> vlc_mutex_unlock( &p_owner->lock );<br> <br> if( unlikely(prerolled) )<br>@@ -1149,8 +1152,8 @@ static bool DecoderPlayAudio( decoder_t *p_dec, block_t *p_audio )<br> return false;<br> }<br> <br>- prerolled = p_owner->i_preroll_end > (vlc_tick_t)INT64_MIN;<br>- p_owner->i_preroll_end = (vlc_tick_t)INT64_MIN;<br>+ prerolled = p_owner->i_preroll_end != PREROLL_NONE;<br>+ p_owner->i_preroll_end = PREROLL_NONE;<br> vlc_mutex_unlock( &p_owner->lock );<br> <br> if( unlikely(prerolled) )<br>@@ -1475,7 +1478,7 @@ static void DecoderProcessFlush( decoder_t *p_dec )<br> }<br> }<br> <br>- p_owner->i_preroll_end = (vlc_tick_t)INT64_MIN;<br>+ p_owner->i_preroll_end = PREROLL_NONE;<br> vlc_mutex_unlock( &p_owner->lock );<br> }<br> <br>@@ -1774,7 +1777,7 @@ static decoder_t * CreateDecoder( vlc_object_t *p_parent,<br> p_dec = &p_owner->dec;<br> <br> p_owner->p_clock = p_clock;<br>- p_owner->i_preroll_end = (vlc_tick_t)INT64_MIN;<br>+ p_owner->i_preroll_end = PREROLL_NONE;<br> p_owner->p_resource = p_resource;<br> p_owner->cbs = cbs;<br> p_owner->cbs_userdata = cbs_userdata;</pre></blockquote></div><br>-- <br>Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.</body></html>