From 3bbec8ac8ab1879d24acbff447850c0e3872daa7 Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Fri, 13 Nov 2009 00:39:22 +0100 Subject: [PATCH] http/dccp: Do not send the audio file header twice. If the http/dccp client connects before stream start and the stream starts at the beginning of the audio file (the common case), we do not need to send the audio file header as it is contained in chunk zero. However, the current code fails to set sender_client->sent_header to a non-zero value in this case. This causes the header to be sent twice. The ogg vorbis decoder is quite forgiving in that respect, which is probably why this bug went unnoticed for so long. This patch gets it right. --- send_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/send_common.c b/send_common.c index 200e59ab..8653c330 100644 --- a/send_common.c +++ b/send_common.c @@ -159,8 +159,8 @@ void send_chunk(struct sender_client *sc, struct sender_status *ss, if (ret < 0) goto out; } - sc->header_sent = 1; } + sc->header_sent = 1; ret = send_queued_chunks(sc->fd, sc->cq, max_bytes_per_write); if (ret < 0) { shutdown_client(sc, ss); -- 2.39.2