summaryrefslogtreecommitdiff
path: root/libavfilter/vf_fps.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-09-02 04:32:23 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-09-02 04:32:23 +0200
commitcdd5df8189ff1537f7abe8defe971f80602cc2d2 (patch)
tree6a29e1edc881c240aba773c3c8b6b5365d3bf145 /libavfilter/vf_fps.c
parentb339dccbba877eb00c4cac2b2761c07f9ba064e6 (diff)
downloadffmpeg-cdd5df8189ff1537f7abe8defe971f80602cc2d2.tar.gz
avfilter/vf_fps: make sure the fifo is not empty before using it
Fixes Ticket2905 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavfilter/vf_fps.c')
-rw-r--r--libavfilter/vf_fps.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavfilter/vf_fps.c b/libavfilter/vf_fps.c
index 4eb3663b1a..06ebdfadce 100644
--- a/libavfilter/vf_fps.c
+++ b/libavfilter/vf_fps.c
@@ -205,7 +205,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *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);
}