Commit 73b87304 authored by Stefano Sabatini's avatar Stefano Sabatini

ffserver: improve error feedback in case of write_header() failure

parent b133ec62
...@@ -2321,9 +2321,10 @@ static int http_prepare_data(HTTPContext *c) ...@@ -2321,9 +2321,10 @@ static int http_prepare_data(HTTPContext *c)
*/ */
c->fmt_ctx.max_delay = (int)(0.7*AV_TIME_BASE); c->fmt_ctx.max_delay = (int)(0.7*AV_TIME_BASE);
if (avformat_write_header(&c->fmt_ctx, NULL) < 0) { if ((ret = avformat_write_header(&c->fmt_ctx, NULL)) < 0) {
http_log("Error writing output header\n"); http_log("Error writing output header for stream '%s': %s\n",
return -1; c->stream->filename, av_err2str(ret));
return ret;
} }
av_dict_free(&c->fmt_ctx.metadata); av_dict_free(&c->fmt_ctx.metadata);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment