[vlc-devel] src/input: add a new input option flag to replace values of existing options (was: fix buffer underflow by avoiding inconsistent state in error case)

David Fuhrmann david.fuhrmann at gmail.com
Fri Jul 4 22:53:22 CEST 2014


Am 04.07.2014 um 22:46 schrieb Rémi Denis-Courmont <remi at remlab.net>:

> Le vendredi 4 juillet 2014, 22:41:50 David Fuhrmann a écrit :
>> Am 04.07.2014 um 22:32 schrieb Rémi Denis-Courmont <remi at remlab.net>:
>>> Le vendredi 4 juillet 2014, 22:00:32 David Fuhrmann a écrit :
>>>> I already told you that UNIQUE was not working at all. start-time=0 is
>>>> not
>>>> the same string as start-time=10. And regardless of the flag, the action
>>>> is
>>>> not a replace, but an append to an existing array, which got bigger and
>>>> bigger.
>>> 
>>> You were not making any sense and you still are not. There is no point
>>> repeating for me to repeat the same thing over and over. That does not
>>> mean I agree.
>> 
>> Sorry, but _you_ are not making sense. Or maybe we are still
>> misunderstanding each other. Please look at the code. INSERT_ELEM is
>> clearly inserting an element into an array, not replacing an existing
>> element.
> 
> I don't make sense? So there can be another sensible behaviour than keeping 
> the oldest or the newest option value for a given item option. Well, I wonder 
> what that third sane possibility would be.

I think we are talking about different things.

I am talking about the p_input->ppsz_options array, which gets larger and larger if you continue adding distinct „start-time=xy“ options. This is a fact, and please look at the code for that. And this array is saved to the media library, which was the reason to do the patch.

You are probably talking about how this array is internally handled, and how the values are parsed and used. Of course you can only apply one value to one option. But this was never my point.

Regards,
David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20140704/372bd7a6/attachment.html>


More information about the vlc-devel mailing list