[vlc-devel] [PATCH 09/10] Add new directory 'playlist' module whose job is to feed the playlist with the content of pf_readdir enabled access

Julien 'Lta' BALLET contact at lta.io
Mon Jun 16 18:35:15 CEST 2014


On Mon, Jun 16, 2014 at 4:44 PM, Rémi Denis-Courmont <remi at remlab.net>
wrote:

>
> +int Import_Dir ( vlc_object_t *p_this)
>> +{
>> +    demux_t  *p_demux = (demux_t *)p_this;
>> +
>> +    bool b_is_dir = false;
>> +    stream_Control( p_demux->s, STREAM_IS_DIRECTORY, &b_is_dir );
>>
>
> In principles, b_is_dir is undefined on error, so slightly flawed logic.
>
>
this  call is documented as 'should not fail', so this should not happen.
But i've fixed it anyway


>
>> +
>> +void Close_Dir ( vlc_object_t *p_this)
>> +{
>> +
>> +}
>>
>
> No compiler warnings?
>

Fixed. Thank you very much


> +    while( ( p_input = stream_ReadDir(p_demux->s) ) != NULL )
>> +    {
>> +        msg_Warn(p_demux, "FOUND ITEM: %s", p_input->psz_name);
>>
>
> ...
>

Indeed :-/

--Lta
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20140616/810e8c5c/attachment.html>


More information about the vlc-devel mailing list