aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarvin Scholz <epirat07@gmail.com>2014-11-11 02:10:22 +0100
committerMichael Niedermayer <michaelni@gmx.at>2014-11-11 14:57:46 +0100
commit17dc39e76baf8a481fc8b1d24ee4cf7a6ffe1c1d (patch)
treeca2f81980debed60e81e3ede4176f0fce42128c8
parent5e08b54f47e8168e1f8203d9b5d0d1fba3c9f822 (diff)
downloadffmpeg-17dc39e76baf8a481fc8b1d24ee4cf7a6ffe1c1d.tar.gz
Icecast: Use 100-continue if possible for proper error handling
Using 100-continue ffmpeg will only send data if the server confirms it, so if there is an error with auth or mounpoint, this allows that it is properly reported to the user. Else ffmpeg sends data and just quits at some point without an error message. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavformat/icecast.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavformat/icecast.c b/libavformat/icecast.c
index 7472416bfc..973c0c26a2 100644
--- a/libavformat/icecast.c
+++ b/libavformat/icecast.c
@@ -119,6 +119,7 @@ static int icecast_open(URLContext *h, const char *uri, int flags)
av_dict_set(&opt_dict, "content_type", s->content_type, 0);
else
av_dict_set(&opt_dict, "content_type", "audio/mpeg", 0);
+ av_dict_set(&opt_dict, "send_expect_100", s->legacy_icecast ? "0" : "1", 0);
if (NOT_EMPTY(s->user_agent))
av_dict_set(&opt_dict, "user_agent", s->user_agent, 0);