vsrc_buffer: when no frame is available, return an error instead of segfaulting.
authorAnton Khirnov <anton@khirnov.net>
Sun, 1 Apr 2012 13:18:00 +0000 (15:18 +0200)
committerAnton Khirnov <anton@khirnov.net>
Thu, 5 Apr 2012 07:30:09 +0000 (09:30 +0200)
libavfilter/vsrc_buffer.c

index 665b33c..dfe5bf5 100644 (file)
@@ -162,7 +162,7 @@ static int request_frame(AVFilterLink *link)
     if (!av_fifo_size(c->fifo)) {
         av_log(link->src, AV_LOG_ERROR,
                "request_frame() called with no available frame!\n");
-        //return -1;
+        return AVERROR(EINVAL);
     }
     av_fifo_generic_read(c->fifo, &buf, sizeof(buf), NULL);