[FFmpeg-devel] [PATCH] RPL demuxer

Michael Niedermayer michaelni
Sat Nov 3 00:56:42 CET 2007


On Sat, Nov 03, 2007 at 12:04:01AM +0100, Aurelien Jacobs wrote:
[...]
> > +	rpl->author = b;
> > +
> > +	i++;
> > +
> > +	sscanf(buffer + so[i], "%i", &rpl->video_format);
> > +
> > +	i++;
> > +
> > +	sscanf(buffer + so[i], "%i", &rpl->video_width);
> 
> All those i++ lines and empty lines make the code much longer than needed.
> I would prefer seeing something like:
> 
> +	sscanf(buffer + so[i++], "%i", &rpl->video_format);
> +	sscanf(buffer + so[i++], "%i", &rpl->video_width);

even better would be IMHO:
rpl->video_format= atoi(buffer + so[i++]);
rpl->video_width = atoi(buffer + so[i++]);

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Republics decline into democracies and democracies degenerate into
despotisms. -- Aristotle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20071103/57413b12/attachment.pgp>



More information about the ffmpeg-devel mailing list