<html><head></head><body>Hi,<br><br>The callback needs to be renamed then. This may save one parameter, but it's rather obscure.<br><br><div class="gmail_quote">Le 3 septembre 2019 12:29:34 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">If we need to pass new stats where the decoded amount didn't change we can<br>always reintroduce it.<hr> src/input/decoder.c | 20 ++++++++++----------<br> 1 file changed, 10 insertions(+), 10 deletions(-)<br><br>diff --git a/src/input/decoder.c b/src/input/decoder.c<br>index e28b179212..63f858c397 100644<br>--- a/src/input/decoder.c<br>+++ b/src/input/decoder.c<br>@@ -78,7 +78,7 @@ struct decoder_owner<br> <br>     vlc_thread_t     thread;<br> <br>-    void (*pf_update_stat)( struct decoder_owner *, unsigned decoded, unsigned lost );<br>+    void (*pf_update_stat)( struct decoder_owner *, unsigned lost );<br> <br>     /* Some decoders require already packetized data (ie. not truncated) */<br>     decoder_t *p_packetizer;<br>@@ -1056,7 +1056,7 @@ static int DecoderPlayVideo( struct decoder_owner *p_owner, picture_t *p_picture<br> }<br> <br> static void DecoderUpdateStatVideo( struct decoder_owner *p_owner,<br>-                                    unsigned decoded, unsigned lost )<br>+                                    unsigned lost )<br> {<br>     unsigned displayed = 0;<br> <br>@@ -1068,7 +1068,7 @@ static void DecoderUpdateStatVideo( struct decoder_owner *p_owner,<br>         lost += vout_lost;<br>     }<br> <br>-    decoder_Notify(p_owner, on_new_video_stats, decoded, lost, displayed);<br>+    decoder_Notify(p_owner, on_new_video_stats, 1, lost, displayed);<br> }<br> <br> static void DecoderQueueVideo( decoder_t *p_dec, picture_t *p_pic )<br>@@ -1078,7 +1078,7 @@ static void DecoderQueueVideo( decoder_t *p_dec, picture_t *p_pic )<br> <br>     int success = DecoderPlayVideo( p_owner, p_pic );<br> <br>-    p_owner->pf_update_stat( p_owner, 1, success != VLC_SUCCESS ? 1 : 0 );<br>+    p_owner->pf_update_stat( p_owner, success != VLC_SUCCESS ? 1 : 0 );<br> }<br> <br> static int thumbnailer_update_format( decoder_t *p_dec )<br>@@ -1181,7 +1181,7 @@ static int DecoderPlayAudio( struct decoder_owner *p_owner, block_t *p_audio )<br> }<br> <br> static void DecoderUpdateStatAudio( struct decoder_owner *p_owner,<br>-                                    unsigned decoded, unsigned lost )<br>+                                    unsigned lost )<br> {<br>     unsigned played = 0;<br> <br>@@ -1193,7 +1193,7 @@ static void DecoderUpdateStatAudio( struct decoder_owner *p_owner,<br>         lost += aout_lost;<br>     }<br> <br>-    decoder_Notify(p_owner, on_new_audio_stats, decoded, lost, played);<br>+    decoder_Notify(p_owner, on_new_audio_stats, 1, lost, played);<br> }<br> <br> static void DecoderQueueAudio( decoder_t *p_dec, block_t *p_aout_buf )<br>@@ -1202,7 +1202,7 @@ static void DecoderQueueAudio( decoder_t *p_dec, block_t *p_aout_buf )<br> <br>     int success = DecoderPlayAudio( p_owner, p_aout_buf );<br> <br>-    p_owner->pf_update_stat( p_owner, 1, success != VLC_SUCCESS ? 1 : 0 );<br>+    p_owner->pf_update_stat( p_owner, success != VLC_SUCCESS ? 1 : 0 );<br> }<br> <br> static void DecoderPlaySpu( struct decoder_owner *p_owner, subpicture_t *p_subpic )<br>@@ -1240,9 +1240,9 @@ static void DecoderPlaySpu( struct decoder_owner *p_owner, subpicture_t *p_subpi<br> }<br> <br> static void DecoderUpdateStatSpu( struct decoder_owner *p_owner,<br>-                                  unsigned decoded, unsigned lost )<br>+                                  unsigned lost )<br> {<br>-    (void) p_owner; (void) decoded; (void) lost;<br>+    (void) p_owner; (void) lost;<br> }<br> <br> static void DecoderQueueSpu( decoder_t *p_dec, subpicture_t *p_spu )<br>@@ -1278,7 +1278,7 @@ static void DecoderDecode( struct decoder_owner *p_owner, block_t *p_block )<br>     switch( ret )<br>     {<br>         case VLCDEC_SUCCESS:<br>-            p_owner->pf_update_stat( p_owner, 1, 0 );<br>+            p_owner->pf_update_stat( p_owner, 0 );<br>             break;<br>         case VLCDEC_ECRITICAL:<br>             p_owner->error = true;</pre></blockquote></div><br>-- <br>Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.</body></html>