[FFmpeg-devel] [PATCH] ffserver: improve error feedback in case of av_write_frame() error

Stefano Sabatini stefasab at gmail.com
Tue Dec 10 21:17:06 CET 2013


---
 ffserver.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/ffserver.c b/ffserver.c
index 5bf27fd..51dbe32 100644
--- a/ffserver.c
+++ b/ffserver.c
@@ -2472,8 +2472,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;
                     }
 
-- 
1.8.1.2



More information about the ffmpeg-devel mailing list