avfilter/buffersink: return EOF if closed link in av_buffersink_get_frame_flags()
authorMichael Niedermayer <michaelni@gmx.at>
Sat, 16 May 2015 22:22:09 +0000 (00:22 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Sat, 16 May 2015 22:22:09 +0000 (00:22 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavfilter/buffersink.c

index 525f97b..b145e35 100644 (file)
@@ -132,6 +132,8 @@ int attribute_align_arg av_buffersink_get_frame_flags(AVFilterContext *ctx, AVFr
 
     /* no picref available, fetch it from the filterchain */
     if (!av_fifo_size(buf->fifo)) {
 
     /* no picref available, fetch it from the filterchain */
     if (!av_fifo_size(buf->fifo)) {
+        if (inlink->closed)
+            return AVERROR_EOF;
         if (flags & AV_BUFFERSINK_FLAG_NO_REQUEST)
             return AVERROR(EAGAIN);
         if ((ret = ff_request_frame(inlink)) < 0)
         if (flags & AV_BUFFERSINK_FLAG_NO_REQUEST)
             return AVERROR(EAGAIN);
         if ((ret = ff_request_frame(inlink)) < 0)