avconv: propagate fatal errors from lavfi.
authorAnton Khirnov <anton@khirnov.net>
Tue, 3 Jul 2012 09:44:46 +0000 (11:44 +0200)
committerAnton Khirnov <anton@khirnov.net>
Mon, 9 Jul 2012 06:32:49 +0000 (08:32 +0200)
avconv.c

index fad0626..9df5bb3 100644 (file)
--- a/avconv.c
+++ b/avconv.c
@@ -1556,8 +1556,10 @@ static int poll_filters(void)
             else
                 ret = av_buffersink_read(ost->filter->filter, &picref);
 
-            if (ret < 0)
+            if (ret == AVERROR_EOF || ret == AVERROR(EAGAIN))
                 break;
+            else if (ret < 0)
+                return ret;
 
             avfilter_copy_buf_props(filtered_frame, picref);
             if (picref->pts != AV_NOPTS_VALUE) {