[vlc-devel] [vlc-commits] m3u: Expose playlist title

Rémi Denis-Courmont remi at remlab.net
Tue Sep 29 14:54:53 CEST 2020


And if the demux was not created by an input thread...

Le 29 septembre 2020 11:59:02 GMT+03:00, "Hugo Beauzée-Luyssen" <hugo at beauzee.fr> a écrit :
>On Fri, Sep 25, 2020, at 7:17 PM, Rémi Denis-Courmont wrote:
>> Le tiistaina 22. syyskuuta 2020, 10.33.22 EEST Hugo Beauzée-Luyssen a
>écrit :
>> > vlc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Mon
>Sep 21
>> > 15:45:48 2020 +0200| [8f26c795b8329219acaad18a5d98a58678799f59] |
>> > committer: Hugo Beauzée-Luyssen
>> > 
>> > m3u: Expose playlist title
>> > 
>> > >
>http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=8f26c795b8329219aca
>> > > ad18a5d98a58678799f59
>> > ---
>> > 
>> >  modules/demux/playlist/m3u.c | 6 ++++++
>> >  1 file changed, 6 insertions(+)
>> > 
>> > diff --git a/modules/demux/playlist/m3u.c
>b/modules/demux/playlist/m3u.c
>> > index af743b75da..2cf71fd8d8 100644
>> > --- a/modules/demux/playlist/m3u.c
>> > +++ b/modules/demux/playlist/m3u.c
>> > @@ -332,6 +332,12 @@ static int ReadDir( stream_t *p_demux,
>> > input_item_node_t *p_subitems ) meta.psz_album_art = pf_dup(
>psz_parse );
>> >                  }
>> >              }
>> > +            else if ( !strncasecmp( psz_parse, "PLAYLIST:",
>> > +                      sizeof( "PLAYLIST:" ) - 1 ) )
>> > +            {
>> > +                psz_parse += sizeof( "PLAYLIST:" ) - 1;
>> > +                input_item_SetTitle( p_demux->p_input_item,
>psz_parse );
>> 
>> This is UB if there is no input item. Normally, a stream filter
>returns its 
>> meta-data via control(STREAM_GET_META).
>> 
>
>Isn't the input_item the playlist being parsed? I'm fine adding a NULL
>check but I'm surprised it's needed
>
>-- 
>  Hugo Beauzée-Luyssen
>  hugo at beauzee.fr
>_______________________________________________
>vlc-devel mailing list
>To unsubscribe or modify your subscription options:
>https://mailman.videolan.org/listinfo/vlc-devel

-- 
Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20200929/1abcd5cb/attachment.html>


More information about the vlc-devel mailing list