[vlc-devel] [PATCHv3 6/7] lib: media: copy the input item

Rémi Denis-Courmont remi at remlab.net
Tue Sep 29 17:27:03 CEST 2020


Le tiistaina 29. syyskuuta 2020, 11.10.04 EEST Thomas Guillem a écrit :
> > > -    return libvlc_media_attach_input_item( p_md, p_input_item );
> > > +    input_item_t *p_item_copy = input_item_Copy( p_input_item, NULL );
> > > +    if( p_item_copy != NULL )
> > > +        return libvlc_media_attach_input_item( p_md, p_item_copy );
> > > +    return NULL;
> > 
> > Won't that "unshare" item updates from parsing and from playing?
> > If so, is that expected by apps?
> 
> Yes it will, but only for copy of medias.
> 
> If you create a media, play or preparse it, you will get updates.

That sounds like a regression? I'd expect updates to be shared between 
preparsers, media players and, if that's where the item comes from, SD. At 
least that's how it always worked. While it has its downsides, I suspect that 
the opposite approach will turn out worse.

I don't really understand why you copy items.

-- 
レミ・デニ-クールモン
http://www.remlab.net/





More information about the vlc-devel mailing list