[FFmpeg-cvslog] Icecast: always send a content-type

Marvin Scholz git at videolan.org
Tue Nov 11 14:53:55 CET 2014


ffmpeg | branch: master | Marvin Scholz <epirat07 at gmail.com> | Tue Nov 11 01:51:23 2014 +0100| [5e08b54f47e8168e1f8203d9b5d0d1fba3c9f822] | committer: Michael Niedermayer

Icecast: always send a content-type

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 at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5e08b54f47e8168e1f8203d9b5d0d1fba3c9f822
---

 libavformat/icecast.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavformat/icecast.c b/libavformat/icecast.c
index 7d60e44..7472416 100644
--- a/libavformat/icecast.c
+++ b/libavformat/icecast.c
@@ -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);
 



More information about the ffmpeg-cvslog mailing list