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

Tristan Matthews le.businessman at gmail.com
Fri Apr 12 05:13:48 CEST 2013


On Thu, Apr 11, 2013 at 11:45 AM, Tristan Matthews
<le.businessman at gmail.com> wrote:
> 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.

I've added these corrections to the attached patch.

Best,
Tristan


>>
>> --
>> Rémi Denis-Courmont
>> http://www.remlab.net/
>
>
>
> --
> Tristan Matthews
> web: http://tristanswork.blogspot.com



--
Tristan Matthews
web: http://tristanswork.blogspot.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0005-jack-don-t-use-legacy-packet-API.patch
Type: application/octet-stream
Size: 13154 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20130411/838aa99f/attachment.obj>


More information about the vlc-devel mailing list