From f4fcbfb526cd1b5909f3ce273f4fc0acaa7d6f35 Mon Sep 17 00:00:00 2001 From: chme Date: Sun, 22 Feb 2015 06:13:21 +0100 Subject: [PATCH] Fix segfault when starting playback for audiobooks (dacp_reply_playspec) --- src/httpd_dacp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/httpd_dacp.c b/src/httpd_dacp.c index 043bbba3..ef1a95bc 100644 --- a/src/httpd_dacp.c +++ b/src/httpd_dacp.c @@ -925,7 +925,7 @@ dacp_reply_playspec(struct evhttp_request *req, struct evbuffer *evbuf, char **u } param++; - ret = safe_hextou32(param, &id); + ret = safe_hextou32(param, &pos); if (ret < 0) { DPRINTF(E_LOG, L_DACP, "Couldn't convert container-item-spec/item-spec to an integer in playspec (%s)\n", param); @@ -934,9 +934,9 @@ dacp_reply_playspec(struct evhttp_request *req, struct evbuffer *evbuf, char **u } } else - id = 0; + pos = 0; - DPRINTF(E_DBG, L_DACP, "Playspec request for playlist %d, start song id %d%s\n", plid, id, (shuffle) ? ", shuffle" : ""); + DPRINTF(E_DBG, L_DACP, "Playspec request for playlist %d, start song id %d%s\n", plid, pos, (shuffle) ? ", shuffle" : ""); ps = player_queue_make_pl(plid, &pos); if (!ps)