diff options
author | Stefano Sabatini <stefasab@gmail.com> | 2013-11-29 12:10:20 +0100 |
---|---|---|
committer | Stefano Sabatini <stefasab@gmail.com> | 2013-11-29 12:11:39 +0100 |
commit | 73b87304754c81763b7feb9a7c7e0e15dd72826f (patch) | |
tree | c7432d555b0b884c437d3e59c9cfb22a34e17900 /ffserver.c | |
parent | b133ec62443022de48126cba9352ffefed6b4709 (diff) | |
download | ffmpeg-73b87304754c81763b7feb9a7c7e0e15dd72826f.tar.gz |
ffserver: improve error feedback in case of write_header() failure
Diffstat (limited to 'ffserver.c')
-rw-r--r-- | ffserver.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/ffserver.c b/ffserver.c index 469046a3ef..64b6be248c 100644 --- a/ffserver.c +++ b/ffserver.c @@ -2321,9 +2321,10 @@ static int http_prepare_data(HTTPContext *c) */ c->fmt_ctx.max_delay = (int)(0.7*AV_TIME_BASE); - if (avformat_write_header(&c->fmt_ctx, NULL) < 0) { - http_log("Error writing output header\n"); - return -1; + if ((ret = avformat_write_header(&c->fmt_ctx, NULL)) < 0) { + http_log("Error writing output header for stream '%s': %s\n", + c->stream->filename, av_err2str(ret)); + return ret; } av_dict_free(&c->fmt_ctx.metadata); |