[vlc-devel] jack output: patch for #8126

Tristan Matthews le.businessman at gmail.com
Thu Apr 11 17:45:28 CEST 2013


On Thu, Apr 11, 2013 at 11:29 AM, Rémi Denis-Courmont <remi at remlab.net> wrote:
> This looks wrong:
>
> +        p_block->i_nb_samples -= bytes / sizeof(jack_sample_t);
>
> But of course since you don't use the samples count, you could remove the line
> completely.

Right.

>
> I do not understand why you keep track of bytes_per_frame since it equals 4 *
> channels. In particular, this case looks totally bogus/impossible:
>
> +    if( p_sys->bytes_per_frame == 0 )
> +        return -1;

It's true, this check is pointless.
The only reason I put bytes_per_frame in the struct was because I
considered that it was more readable than writing (4 * channels)
everywhere,
but you're right, it doesn't change so I can get rid of it if you prefer.

Best,
Tristan

>
> --
> Rémi Denis-Courmont
> http://www.remlab.net/



--
Tristan Matthews
web: http://tristanswork.blogspot.com



More information about the vlc-devel mailing list