[vlc-devel] [PATCH 3/6] decoder: call the stat functions directly
Steve Lhomme
robux4 at ycbcr.xyz
Wed Sep 4 11:03:59 CEST 2019
No need for a constant callback.
---
src/input/decoder.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/src/input/decoder.c b/src/input/decoder.c
index 3f1227b1816..c90827716eb 100644
--- a/src/input/decoder.c
+++ b/src/input/decoder.c
@@ -78,8 +78,6 @@ struct decoder_owner
vlc_thread_t thread;
- void (*pf_update_stat)( struct decoder_owner *, unsigned decoded, unsigned lost );
-
/* Some decoders require already packetized data (ie. not truncated) */
decoder_t *p_packetizer;
bool b_packetizer;
@@ -1058,7 +1056,7 @@ static void DecoderQueueVideo( decoder_t *p_dec, picture_t *p_pic )
int success = DecoderPlayVideo( p_owner, p_pic );
- p_owner->pf_update_stat( p_owner, 1, success != VLC_SUCCESS ? 1 : 0 );
+ DecoderUpdateStatVideo( p_owner, 1, success != VLC_SUCCESS ? 1 : 0 );
}
static int thumbnailer_update_format( decoder_t *p_dec )
@@ -1181,7 +1179,7 @@ static void DecoderQueueAudio( decoder_t *p_dec, block_t *p_aout_buf )
int success = DecoderPlayAudio( p_owner, p_aout_buf );
- p_owner->pf_update_stat( p_owner, 1, success != VLC_SUCCESS ? 1 : 0 );
+ DecoderUpdateStatAudio( p_owner, 1, success != VLC_SUCCESS ? 1 : 0 );
}
static void DecoderPlaySpu( struct decoder_owner *p_owner, subpicture_t *p_subpic )
@@ -1812,11 +1810,9 @@ static struct decoder_owner * CreateDecoder( vlc_object_t *p_parent,
p_dec->cbs = &dec_video_cbs;
else
p_dec->cbs = &dec_thumbnailer_cbs;
- p_owner->pf_update_stat = DecoderUpdateStatVideo;
break;
case AUDIO_ES:
p_dec->cbs = &dec_audio_cbs;
- p_owner->pf_update_stat = DecoderUpdateStatAudio;
break;
case SPU_ES:
p_dec->cbs = &dec_spu_cbs;
--
2.17.1
More information about the vlc-devel
mailing list