[FFmpeg-cvslog] lavfi/fifo: do not assume request_frame() returns a frame.

Nicolas George git at videolan.org
Sat Nov 7 18:57:28 CET 2015


ffmpeg | branch: master | Nicolas George <george at nsup.org> | Thu Oct 22 09:57:34 2015 +0200| [67d3f5296ea6dce884ac53f2ea37f45dabaa8bb3] | committer: Nicolas George

lavfi/fifo: do not assume request_frame() returns a frame.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=67d3f5296ea6dce884ac53f2ea37f45dabaa8bb3
---

 libavfilter/fifo.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/libavfilter/fifo.c b/libavfilter/fifo.c
index e477cff..f0b77ff 100644
--- a/libavfilter/fifo.c
+++ b/libavfilter/fifo.c
@@ -201,7 +201,8 @@ static int return_audio_frame(AVFilterContext *ctx)
                     break;
                 } else if (ret < 0)
                     return ret;
-                av_assert0(s->root.next); // If ff_request_frame() succeeded then we should have a frame
+                if (!s->root.next)
+                    return 0;
             }
             head = s->root.next->frame;
 
@@ -237,7 +238,8 @@ static int request_frame(AVFilterLink *outlink)
                 return return_audio_frame(outlink->src);
             return ret;
         }
-        av_assert0(fifo->root.next);
+        if (!fifo->root.next)
+            return 0;
     }
 
     if (outlink->request_samples) {



More information about the ffmpeg-cvslog mailing list