<html><head></head><body>Hi,<br><br>The ternary seems redundant here?<br><br><div class="gmail_quote">Le 27 août 2019 08:27:12 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">No need for pointers.<hr> src/input/decoder.c | 16 +++++++---------<br> 1 file changed, 7 insertions(+), 9 deletions(-)<br><br>diff --git a/src/input/decoder.c b/src/input/decoder.c<br>index 782dc0a422..d05351fa5c 100644<br>--- a/src/input/decoder.c<br>+++ b/src/input/decoder.c<br>@@ -981,10 +981,9 @@ static void DecoderQueueCc( decoder_t *p_videodec, block_t *p_cc,<br> }<br> }<br> <br>-static void DecoderPlayVideo( decoder_t *p_dec, picture_t *p_picture,<br>- unsigned *restrict pi_lost_sum )<br>+static bool DecoderPlayVideo( struct decoder_owner *p_owner, picture_t *p_picture )<br> {<br>- struct decoder_owner *p_owner = dec_get_owner( p_dec );<br>+ decoder_t *p_dec = &p_owner->dec;<br> vout_thread_t *p_vout = p_owner->p_vout;<br> bool prerolled;<br> <br>@@ -993,7 +992,7 @@ static void DecoderPlayVideo( decoder_t *p_dec, picture_t *p_picture,<br> {<br> vlc_mutex_unlock( &p_owner->lock );<br> picture_Release( p_picture );<br>- return;<br>+ return false;<br> }<br> <br> prerolled = p_owner->i_preroll_end > (vlc_tick_t)INT64_MIN;<br>@@ -1067,10 +1066,10 @@ static void DecoderPlayVideo( decoder_t *p_dec, picture_t *p_picture,<br> goto discard;<br> }<br> <br>- return;<br>+ return false;<br> discard:<br>- *pi_lost_sum += 1;<br> picture_Release( p_picture );<br>+ return true;<br> }<br> <br> static void DecoderUpdateStatVideo( struct decoder_owner *p_owner,<br>@@ -1092,12 +1091,11 @@ static void DecoderUpdateStatVideo( struct decoder_owner *p_owner,<br> static void DecoderQueueVideo( decoder_t *p_dec, picture_t *p_pic )<br> {<br> assert( p_pic );<br>- unsigned i_lost = 0;<br> struct decoder_owner *p_owner = dec_get_owner( p_dec );<br> <br>- DecoderPlayVideo( p_dec, p_pic, &i_lost );<br>+ bool lost = DecoderPlayVideo( p_owner, p_pic );<br> <br>- p_owner->pf_update_stat( p_owner, 1, i_lost );<br>+ p_owner->pf_update_stat( p_owner, 1, lost ? 1 : 0 );<br> }<br> <br> static int thumbnailer_update_format( decoder_t *p_dec )</pre></blockquote></div><br>-- <br>Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.</body></html>