From 8cf717664dfa9e2c938b8ad23a1aacbea41aa16d Mon Sep 17 00:00:00 2001 From: ejurgensen Date: Tue, 26 Feb 2019 23:07:02 +0100 Subject: [PATCH] [player] Don't call event_read_quality() twice --- src/player.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/player.c b/src/player.c index 8b349684..cf31ac96 100644 --- a/src/player.c +++ b/src/player.c @@ -1106,7 +1106,7 @@ source_read(int *nbytes, int *nsamples, struct media_quality *quality, uint8_t * { event_metadata_new(); } - else if (flags & INPUT_FLAG_QUALITY) + else if (flags & INPUT_FLAG_QUALITY || quality->channels == 0) { event_read_quality(); } @@ -1114,7 +1114,6 @@ source_read(int *nbytes, int *nsamples, struct media_quality *quality, uint8_t * if (*nbytes == 0 || quality->channels == 0) { event_read(0); // This will set start_ts even if source isn't open yet - event_read_quality(); // Will poll input for quality since we don't have it return 0; }