aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-09-02 04:32:23 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-09-05 03:01:10 +0200
commit11586b077e6e81bc390b6df657429b4a39741d2f (patch)
tree9f2f14cb2fcf7158ed715a5b53f8dacfad5a4cec
parente12ada6fd1e5860cdbb328eddbcb51c52d2054ca (diff)
downloadffmpeg-11586b077e6e81bc390b6df657429b4a39741d2f.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> (cherry picked from commit cdd5df8189ff1537f7abe8defe971f80602cc2d2) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-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 c13b1bd385..3d355cff1a 100644
--- a/libavfilter/vf_fps.c
+++ b/libavfilter/vf_fps.c
@@ -201,7 +201,7 @@ static int end_frame(AVFilterLink *inlink)
}
/* 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);
}