[FFmpeg-soc] [soc]: r5188 - in concat/libavformat: pls.c xspf.c

Reimar Döffinger Reimar.Doeffinger at gmx.de
Thu Aug 20 13:20:04 CEST 2009


On Thu, Aug 20, 2009 at 11:57:33AM +0200, gkovacs wrote:
> Author: gkovacs
> Date: Thu Aug 20 11:57:33 2009
> New Revision: 5188
> 
> Log:
> switch back from unrolled string comparison loop to strncmp
> 
> Modified:
>    concat/libavformat/pls.c
>    concat/libavformat/xspf.c
> 
> Modified: concat/libavformat/pls.c
> ==============================================================================
> --- concat/libavformat/pls.c	Thu Aug 20 11:23:55 2009	(r5187)
> +++ concat/libavformat/pls.c	Thu Aug 20 11:57:33 2009	(r5188)
> @@ -60,7 +60,7 @@ static int pls_list_files(ByteIOContext 
>              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])
> +            if (!strncmp(s, t, 5))

Obvious question: why strncmp? It is probably slower than memcmp and in
difference to strcmp not any simpler...


More information about the FFmpeg-soc mailing list