[vlc-devel] commit: Implement access_GetParentInput and demux_GetParentInput and use. ( Pierre d'Herbemont )

Laurent Aimar fenrir at via.ecp.fr
Wed Aug 26 21:17:10 CEST 2009


On Wed, Aug 26, 2009, Pierre d'Herbemont wrote:
>
> On Aug 26, 2009, at 8:06 PM, Laurent Aimar wrote:
>
>> Hi,
>>
>> On Wed, Aug 26, 2009, Pierre d'Herbemont wrote:
>>>
>>> On Aug 26, 2009, at 5:12 PM, Rémi Denis-Courmont wrote:
>>>
>>>> Le mercredi 26 août 2009 17:42:01 Pierre d'Herbemont, vous avez  
>>>> écrit :
>>>>> First, demux and access don't properly implement refcounting. If
>>>>> someone is holding a reference to it, its data might get destroyed,
>>>>> and lead to crash for free.
>>>>
>>>> How so? To my knowledge *none* of the demux_t and access_t specific
>>>> members
>>>> are thread-safe. So none of them should be accessed from
>>>> vlc_object_find(_name).
>>>
>>> Are they really?
>>>
>>> demux_IsPathExtension()
>>> {
>>>    const char *psz_ext = strrchr ( p_demux->psz_path, '.' );
>>>    if( !psz_ext || strcasecmp( psz_ext, psz_extension ) )
>>>        return false;
>>> }
>> This function can only be called inside a demuxer function
>
> What is actually ensuring that?
 Nothing, you cannot code completly safe proof with C...

But the thing is, you cannot get a demux object except by doing
nasty things, so I don't think it is a problem.

-- 
fenrir



More information about the vlc-devel mailing list