[vlc-devel] libvlc_input_get_length crashes

Amaresh Ram Amaresh.Ram at lntinfotech.com
Mon Jan 14 04:36:32 CET 2008


Rafaël,

Testcase steps are:

1. Create New vlc instance (using libvlc_new )
      p_vlc = libvlc_new(0, NULL, NULL);
2. Add a url to playlist (using libvlc_playlist_add)
      item_id = libvlc_playlist_add(p_vlc, uri, NULL, NULL);
3. play the last added item (using libvlc_playlist_play)
      libvlc_playlist_play(p_vlc, item_id, 0, NULL, NULL);
4. get the input that is currently being played (using
libvlc_playlist_get_input)
      p_input = libvlc_playlist_get_input( p_vlc, NULL);
5. get input length (using libvlc_input_get_length)
      in_lenght = libvlc_input_get_length(p_input, NULL);

At step 5, application crashes with segmentation fault.

input length needs to be notified to application so that it can change the
UI control on expiry of input length timer.

regards/Amaresh



                                                                           
             Rafaël Carré                                                  
             <funman at videolan.                                             
             org>                                                       To 
             Sent by:                  vlc-devel at videolan.org              
             vlc-devel-bounces                                          cc 
             @videolan.org                                                 
                                                                   Subject 
                                       Re: [vlc-devel]                     
             01/12/2008 07:56          libvlc_input_get_length crashes     
             PM                                                            
                                                                           
                                                                           
             Please respond to                                             
             Mailing list for                                              
             VLC media player                                              
                developers                                                 
             <vlc-devel at videol                                             
                  an.org>                                                  
                                                                           
                                                                           




Le Fri, 11 Jan 2008 02:45:06 +0530,
Amaresh Ram <Amaresh.Ram at lntinfotech.com> a écrit :

>
> Hi,
>
> I am trying to get the length of the video clip using
> libvlc_input_get_length but it crashes.

Do you happen to have a backtrace ? With a full testcase would be
perfect ;)

> I am using the API as follows:
>
> /******************************/
> double inputLength;
> libvlc_input_t *p_input;
>
> p_input = libvlc_playlist_get_input(mp_libvlc , NULL);
> inputLength = libvlc_input_get_length( p_input , NULL);
> libvlc_input_free(p_input);
>
> /***************************************/
>
> Please let me know what is the problem in the call? The code works
> perfectly if I hardcode inputLength inplace of libvlc_input_get_length
> function call.
>
> regards/amaresh
>
>
> ______________________________________________________________________
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> http://mailman.videolan.org/listinfo/vlc-devel


--
Rafaël Carré

______________________________________________________________________(See
attached file: signature.asc)
_______________________________________________
vlc-devel mailing list
To unsubscribe or modify your subscription options:
http://mailman.videolan.org/listinfo/vlc-devel

______________________________________________________________________
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/octet-stream
Size: 194 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20080114/c3b21e40/attachment.obj>


More information about the vlc-devel mailing list