[pulseaudio-discuss] [PATCH 3/8] raop: Log if pa_atoi() fails, latency is not used anyway
Peter Meerwald-Stadler
pmeerw at pmeerw.net
Wed Mar 8 15:09:34 UTC 2017
Coverity ID: #1398152
Signed-off-by: Peter Meerwald-Stadler <pmeerw at pmeerw.net>
---
src/modules/raop/raop-client.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/modules/raop/raop-client.c b/src/modules/raop/raop-client.c
index e2cf04e..78f86a4 100644
--- a/src/modules/raop/raop-client.c
+++ b/src/modules/raop/raop-client.c
@@ -1102,8 +1102,10 @@ static void rtsp_stream_cb(pa_rtsp_client *rtsp, pa_rtsp_state_t state, pa_rtsp_
pa_log_debug("RAOP: RECORD");
alt = pa_xstrdup(pa_headerlist_gets(headers, "Audio-Latency"));
- if (alt)
- pa_atoi(alt, &latency);
+ if (alt) {
+ if (pa_atoi(alt, &latency) < 0)
+ pa_log("Failed to parse audio latency");
+ }
pa_raop_packet_buffer_reset(c->pbuf, c->seq);
--
2.7.4
More information about the pulseaudio-discuss
mailing list