[FFmpeg-devel] [PATCH] af_pan: comment a tricky piece of code.

Clément Bœsch ubitux at gmail.com
Wed Feb 15 19:50:31 CET 2012


On Wed, Feb 15, 2012 at 07:43:42PM +0100, Nicolas George wrote:
> 
> Signed-off-by: Nicolas George <nicolas.george at normalesup.org>
> ---
>  libavfilter/af_pan.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> 
> I wrote it and I had trouble remembering what it did...
> 

I was wondering too... :)

Actually, I wouldn't mind a few logical blocks comments in a few cases,
even if relatively obvious.

> 
> diff --git a/libavfilter/af_pan.c b/libavfilter/af_pan.c
> index 9f293a6..0280ab2 100644
> --- a/libavfilter/af_pan.c
> +++ b/libavfilter/af_pan.c
> @@ -66,6 +66,7 @@ static int parse_channel_name(char **arg, int *rchannel, int *rnamed)
>  
>      if (sscanf(*arg, " %7[A-Z] %n", buf, &len)) {
>          layout0 = layout = av_get_channel_layout(buf);
> +        /* channel_id <- first set bit in layout */

Couldn't you just say "the first bit set in layout defines channel_id"?

[...]

-- 
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120215/d188de51/attachment.asc>


More information about the ffmpeg-devel mailing list