Skip to content

Commit

Permalink
avfilter/vf_fps: make sure the fifo is not empty before using it
Browse files Browse the repository at this point in the history
Fixes Ticket2905

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
  • Loading branch information
michaelni committed Sep 2, 2013
1 parent b339dcc commit cdd5df8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libavfilter/vf_fps.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit cdd5df8

Please sign in to comment.