[FFmpeg-cvslog] avfilter/vf_fps: make sure the fifo is not empty before using it

Michael Niedermayer git at videolan.org
Thu Oct 3 01:26:56 CEST 2013


ffmpeg | branch: release/1.2 | Michael Niedermayer <michaelni at gmx.at> | Mon Sep  2 04:32:23 2013 +0200| [0f3cdddf3886ebd5abc8efad72bc193189c815bf] | committer: Michael Niedermayer

avfilter/vf_fps: make sure the fifo is not empty before using it

Fixes Ticket2905

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit cdd5df8189ff1537f7abe8defe971f80602cc2d2)

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 libavfilter/vf_fps.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavfilter/vf_fps.c b/libavfilter/vf_fps.c
index 29eedc7..d55b5dc 100644
--- a/libavfilter/vf_fps.c
+++ b/libavfilter/vf_fps.c
@@ -203,7 +203,7 @@ static int filter_frame(AVFilterLink *inlink, AVFilterBufferRef *buf)
     }
 
     /* now wait for the next timestamp */
-    if (buf->pts == AV_NOPTS_VALUE) {
+    if (buf->pts == AV_NOPTS_VALUE || av_fifo_size(s->fifo) <= 0) {
         return write_to_fifo(s->fifo, buf);
     }
 



More information about the ffmpeg-cvslog mailing list