[inputs/player] Fixup part 1

This commit is contained in:
ejurgensen
2019-02-17 10:41:11 +01:00
parent d008e241cf
commit b7add1d0fa
4 changed files with 55 additions and 18 deletions

View File

@@ -69,9 +69,12 @@ stop(struct input_source *source)
struct transcode_ctx *ctx = source->input_ctx;
transcode_cleanup(&ctx);
evbuffer_free(source->evbuf);
if (source->evbuf)
evbuffer_free(source->evbuf);
source->input_ctx = NULL;
source->evbuf = NULL;
return 0;
}

View File

@@ -840,7 +840,8 @@ stop(struct input_source *source)
DPRINTF(E_DBG, L_PLAYER, "Stopping pipe\n");
evbuffer_free(source->evbuf);
if (source->evbuf)
evbuffer_free(source->evbuf);
pipe_close(pipe->fd);
@@ -858,6 +859,7 @@ stop(struct input_source *source)
pipe_free(pipe);
source->input_ctx = NULL;
source->evbuf = NULL;
return 0;
}