Browse Source

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>
tags/n2.5
Marvin Scholz Michael Niedermayer 11 years ago
parent
commit
17dc39e76b
1 changed files with 1 additions and 0 deletions
  1. +1
    -0
      libavformat/icecast.c

+ 1
- 0
libavformat/icecast.c View File

@@ -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);



Loading…
Cancel
Save