OSDN Git Service

ffserver: improve error feedback in case of av_write_frame() error
authorStefano Sabatini <stefasab@gmail.com>
Tue, 10 Dec 2013 19:11:28 +0000 (20:11 +0100)
committerStefano Sabatini <stefasab@gmail.com>
Fri, 13 Dec 2013 08:42:15 +0000 (09:42 +0100)
ffserver.c

index 4d656b0..e67f67a 100644 (file)
@@ -2455,8 +2455,9 @@ static int http_prepare_data(HTTPContext *c)
                     if (pkt.pts != AV_NOPTS_VALUE)
                         pkt.pts = av_rescale_q(pkt.pts, ist->time_base, ost->time_base);
                     pkt.duration = av_rescale_q(pkt.duration, ist->time_base, ost->time_base);
-                    if (av_write_frame(ctx, &pkt) < 0) {
-                        http_log("Error writing frame to output\n");
+                    if ((ret = av_write_frame(ctx, &pkt)) < 0) {
+                        http_log("Error writing frame to output for stream '%s': %s\n",
+                                 c->stream->filename, av_err2str(ret));
                         c->state = HTTPSTATE_SEND_DATA_TRAILER;
                     }