Commit cdd5df81 authored by Michael Niedermayer's avatar Michael Niedermayer

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

Fixes Ticket2905
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent b339dccb
......@@ -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);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment