[vlc-devel] [PATCH] input: Fill in the input_item es.

Rafaël Carré rafael.carre at gmail.com
Sun Oct 17 11:45:54 CEST 2010


On Sun, 17 Oct 2010 12:06:55 +0300
"Rémi Denis-Courmont" <remi at remlab.net> wrote:

> Le dimanche 17 octobre 2010 11:53:37 Rafaël Carré, vous avez écrit :
> > Hi, I'm sending pdherbemont's patch synced to master, with some
> > small changes:
> > 	s/This is mostly libvlc_media_es_t/This is exactly
> > libvlc_media_track_info_t/ remove 'found' variable from
> > input_item_UpdateTracksInfo()
> > 	check malloc() return value
> > 
> > However I'm wondering why this is really needed:
> > 	How big is the memory improvement ?
> > 	How does this "allow libvlc_media_get_es() to properly work
> > after libvlc_media_parse()" ? -> IIUC we still need to play the
> > media to get information from the decoder
> > 
> > Original thread:
> > http://mailman.videolan.org/pipermail/vlc-devel/2010-February/073702.html
> 
> /* Called by es_out when a new Elementary Stream is added or updated.
> */ +void input_item_UpdateTracksInfo(input_item_t *item, const
> es_format_t *fmt) +{
> +    int i;
> +
> +    vlc_mutex_lock( &item->lock );
> +
> +    input_item_track_info_t *track_info =
> track_info_new_from_format(fmt);
> +    if( !track_info )
> +    {
> +        vlc_mutex_unlock( &item->lock );
> +        return NULL;
> +    }
> 
> Why do you need the mutex there? Otherwise, this looks fine to me.

Not needed, thanks for spotting

-- 
✍ Rafaël Carré ☺
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-input-Fill-in-the-input_item-es.patch
Type: text/x-patch
Size: 7190 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20101017/768c25e4/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20101017/768c25e4/attachment.sig>


More information about the vlc-devel mailing list