[vlc-devel] [PATCH 5/6] decoder: simplify the lost picture stat handling
Steve Lhomme
robux4 at ycbcr.xyz
Wed Sep 4 11:04:01 CEST 2019
---
src/input/decoder.c | 13 +++++--------
1 file changed, 5 insertions(+), 8 deletions(-)
diff --git a/src/input/decoder.c b/src/input/decoder.c
index 9b5d5b171ec..0a4e00b91b4 100644
--- a/src/input/decoder.c
+++ b/src/input/decoder.c
@@ -1033,20 +1033,17 @@ static int DecoderPlayVideo( struct decoder_owner *p_owner, picture_t *p_picture
return VLC_SUCCESS;
}
-static void DecoderUpdateStatVideo( struct decoder_owner *p_owner,
- unsigned lost )
+static void DecoderUpdateStatVideo( struct decoder_owner *p_owner, bool lost )
{
unsigned displayed = 0;
-
+ unsigned vout_lost = 0;
if( p_owner->p_vout != NULL )
{
- unsigned vout_lost = 0;
-
vout_GetResetStatistic( p_owner->p_vout, &displayed, &vout_lost );
- lost += vout_lost;
}
+ if (lost) vout_lost++;
- decoder_Notify(p_owner, on_new_video_stats, 1, lost, displayed);
+ decoder_Notify(p_owner, on_new_video_stats, 1, vout_lost, displayed);
}
static void DecoderQueueVideo( decoder_t *p_dec, picture_t *p_pic )
@@ -1056,7 +1053,7 @@ static void DecoderQueueVideo( decoder_t *p_dec, picture_t *p_pic )
int success = DecoderPlayVideo( p_owner, p_pic );
- DecoderUpdateStatVideo( p_owner, success != VLC_SUCCESS ? 1 : 0 );
+ DecoderUpdateStatVideo( p_owner, success != VLC_SUCCESS );
}
static int thumbnailer_update_format( decoder_t *p_dec )
--
2.17.1
More information about the vlc-devel
mailing list