[FFmpeg-soc] [soc]: r5184 - concat/libavformat/xspf.c
Reimar Döffinger
Reimar.Doeffinger at gmx.de
Thu Aug 20 11:12:59 CEST 2009
On Thu, Aug 20, 2009 at 10:56:55AM +0200, gkovacs wrote:
> + char t[] = "<?xml";
> + char s[5] = {0};
> + char v[] = "<playlist";
> + char u[9] = {0};
Bad names. And why not t and v "static const" ?
> + if (!fxml) {
> + s[0] = s[1];
> + s[1] = s[2];
> + s[2] = s[3];
> + s[3] = s[4];
> + s[4] = c;
> + if (s[0] == t[0] && s[1] == t[1] && s[2] == t[2] && s[3] == t[3] && s[4] == t[4])
> + fxml = 1;
> + }
> + if (!ftag) {
> + u[0] = u[1];
> + u[1] = u[2];
> + u[2] = u[3];
> + u[3] = u[4];
> + u[4] = u[5];
> + u[5] = u[6];
> + u[6] = u[7];
> + u[7] = u[8];
> + u[8] = c;
> + if (u[0] == v[0] && u[1] == v[1] && u[2] == v[2] && u[3] == v[3] && u[4] == v[4] &&
> + u[5] == v[5] && u[6] == v[6] && u[7] == v[7] && u[8] == v[8])
> + ftag = 1;
memmove and memcmp? strcmp would be possible, too, if you pad the s/u
arrays with a closing 0.
Or if you go for speed use a uint64_t
More information about the FFmpeg-soc
mailing list