On Tue, Aug 7, 2012 at 4:48 PM, Luca Barbato <lu_z...@gentoo.org> wrote:
> On 08/07/2012 04:31 PM, Martin Storsjö wrote:
>> On Tue, 7 Aug 2012, Luca Barbato wrote:
>>
>>> On 8/2/12 4:15 PM, Samuel Pitoiset wrote:
>>>> +static void del_tracked_method(RTMPContext *rt, int index)
>>>> +{
>>>> +    int i;
>>>> +
>>>> +    rt->nb_tracked_methods--;
>>>> +    for (i = index; i < rt->nb_tracked_methods; i++) {
>>>> +        rt->tracked_methods[i] = rt->tracked_methods[i + 1];
>>>> +    }
>>>> +}
>>>
>>> Not sure it will work, you have to expect them out of order.
>>
>> Haven't read the rest of this yet, but this particular snippet doesn't
>> seem to expect things in any order - this just removes an element at the
>> middle of the array and shifts the following ones.
>>
>> This particular function looks sensible to me, although it could be done
>> with a call to memmove instead.
>
> You are right =_=;

I think you are right too, let's improve this function and update the patch.


-- 
Best regards,
Samuel Pitoiset.
_______________________________________________
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to