Icecast: always send a content-type
authorMarvin Scholz <epirat07@gmail.com>
Tue, 11 Nov 2014 00:51:23 +0000 (01:51 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 11 Nov 2014 13:49:08 +0000 (14:49 +0100)
use a default (audio/mpeg for historical reason) if none. Required since Icecast 2.4.1
Not using AVOption default because this breaks content-type warnings (needs to
detect if no type was set by the user)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/icecast.c

index 7d60e44..7472416 100644 (file)
@@ -117,6 +117,8 @@ static int icecast_open(URLContext *h, const char *uri, int flags)
     av_dict_set(&opt_dict, "chunked_post", "0", 0);
     if (NOT_EMPTY(s->content_type))
         av_dict_set(&opt_dict, "content_type", s->content_type, 0);
+    else
+        av_dict_set(&opt_dict, "content_type", "audio/mpeg", 0);
     if (NOT_EMPTY(s->user_agent))
         av_dict_set(&opt_dict, "user_agent", s->user_agent, 0);