Mercurial > mplayer.hg
comparison libmpcodecs/vf_screenshot.c @ 36751:ca939d7e25be
Use sizeof instead of hardcoded number.
author | reimar |
---|---|
date | Sun, 16 Feb 2014 14:01:21 +0000 |
parents | 8a1186284090 |
children | af146b0d33f0 |
comparison
equal
deleted
inserted
replaced
36750:8a1186284090 | 36751:ca939d7e25be |
---|---|
128 } | 128 } |
129 | 129 |
130 static void gen_fname(struct vf_priv_s* priv) | 130 static void gen_fname(struct vf_priv_s* priv) |
131 { | 131 { |
132 do { | 132 do { |
133 snprintf (priv->fname, 100, "shot%04d.png", ++priv->frameno); | 133 snprintf(priv->fname, sizeof(priv->fname), "shot%04d.png", ++priv->frameno); |
134 } while (fexists(priv->fname) && priv->frameno < 100000); | 134 } while (fexists(priv->fname) && priv->frameno < 100000); |
135 if (fexists(priv->fname)) { | 135 if (fexists(priv->fname)) { |
136 priv->fname[0] = '\0'; | 136 priv->fname[0] = '\0'; |
137 return; | 137 return; |
138 } | 138 } |