[vlc-devel] libvlc_MediaInstanceReachedEnd called twice (libvlc)

Pierre d'Herbemont pdherbemont at free.fr
Tue Jan 15 21:40:17 CET 2008


It is not really explicit but I guess that's comes from the "seekable"  
and "pausable" variable that gets changed/destroyed.

I'll try to fix that in the next days.

Pierre.

On Jan 15, 2008, at 9:36 PM, jboileau wrote:

> Hi Pierre,
>
> I may not be as much help has I would like to, but here goes. My  
> application is under Windows and I use Visual Studio to develop it.  
> I do not link with libvlc-control.lib because there is no lib file  
> for M$VS. Instead I use getProcAddress to retrieve the addresses of  
> the functions I need in libvlc-control.dll. The traces I get when I  
> breakpoint in my function that is called when  
> libvlc_MediaInstanceReachedEvent is triggered are listed below. I  
> have done my best to derive in which function each of the stack  
> addresses point to and have added these names next to the the trace.
>
> When the movie finishes, the first call to my  
> libvlc_MediaInstanceReachedEvent callback has this call stack when  
> it hits my breakpoint:
>
> > LibVLCTest.exe!ALibVLC::mMediaInstanceReachedEnd(const  
> libvlc_event_t * p_event=0x037bfe18, void * p_user_data=0x00327048)   
> Line 901 C++
>   libvlc-control.dll!6d7c76e0()  libvlc_event_send
>   msvcrt.dll!77c2c2e3 ()
>   libvlc-control.dll!6d7ca472()  libvlc_media_instance_get_drawable
>   libvlc.dll!6a38a8e2()  __var_Change
>   libvlc.dll!6a388e1e()  __vlc_object_find
>   libvlc.dll!6a38b872()  __var_Set
>   libvlc.dll!6a38b6bb ()  __var_Get
>   libvlc.dll!6a335644()  __input_Preparse
>   libvlc.dll!6a3364e7()  __input_Preparse
>   msvcrt.dll!77c3a3b0()
>   ntdll.dll!7c96cde9()
>   kernel32.dll!7c80b683()
>   ntdll.dll!7c96cde9()
> The second event generates this call stack for the same breakpoint:
>
> > LibVLCTest.exe!ALibVLC::mMediaInstanceReachedEnd(const  
> libvlc_event_t * p_event=0x037bfea8, void * p_user_data=0x00327048)   
> Line 901 C++
>   libvlc-control.dll!6d7c76e0()  libvlc_event_send
>   msvcrt.dll!77c2c2e3 ()
>   libvlc-control.dll!6d7ca472()  libvlc_media_instance_get_drawable
>   libvlc.dll!6a38a8e2()  __var_Change
>   libvlc.dll!6a38b872()  __var_Set
>   libvlc.dll!6a32df46()  input_DestroyThread
>   libvlc.dll!6a336597 ()  __input_Read
>   msvcrt.dll!77c3a3b0()
>   ntdll.dll!7c96cde9()
>   kernel32.dll!7c80b683()
>   ntdll.dll!7c96cde9()
> After that I get an unhandled exception with the folowing call stack:
>
>  Unhandled exception at 0x7c918fea in LibVLCTest.exe: 0xC0000005:  
> Access violation writing location 0x00000010.
>
>  > ntdll.dll!7c918fea()
>   libvlc.dll!6a370e88()  mdate
>   ntdll.dll!7c90104b()
>    libvlc.dll!6a345dee()  decoder_SynchroNewPicture
>   msvcrt.dll!77c3a3b0()
>   kernel32.dll!7c80b683()
>
> I hope I am of some help!
>
> Jacques Boileau
>
> On Jan 15, 2008 2:38 PM, Pierre d'Herbemont <pdherbemont at free.fr>  
> wrote:
> That's weird. I have committed something to fix that problem of  
> libvlc_MediaInstanceReachedEnd called twice, it should send  
> libvlcMediaInstanceEncounteredError on error now.
>
> Could you provide a back trace to see who is sending that  
> libvlc_MediaInstanceReachedEnd twice?
>
> Thanks!
>
> Pierre.
>
> On Jan 15, 2008, at 8:22 PM, jboileau wrote:
>
>> Hi Pierre,
>>
>> just to let you know, I have tried last night's build and now the  
>> workaround does not work anymore. The event  
>> libvlc_MediaInstanceReachedEnd is triggered twice for each play but  
>> each time the state is libvlc_Ended. I can't differiantiate between  
>> the two anymore.
>>
>> Jacques Boileau
>>
>> PS. I have done a week long test with the january 2nd build, which  
>> works pretty well for me, and everything was stable with very  
>> little memory increase over the week long test! Hooray for libvlc!  
>> The test consisted of a movie playing the video locally and  
>> streaming its audio and 7 mp3s being streamded to different ports  
>> using UDP. libvlc_MediaInstanceReachedEnd was used to detect the  
>> end of any of these and restart it. Played for the full week, no  
>> problem!
>>
>> On Jan 2, 2008 3:53 PM, Pierre d'Herbemont <pdherbemont at free.fr>  
>> wrote:
>> Hi Jacques,
>>
>> Well, that's a work around because some demuxer announce the end by  
>> an ERROR_S state. Obviously this is wrong, but I didn't take the  
>> time to investigate more on that. I think it will stay like that a  
>> bit more until I take the time to fix that,
>>
>> Thanks for the report!
>>
>> Pierre.
>>
>> On Jan 2, 2008, at 8:47 PM, jboileau wrote:
>>
>>> Hi,
>>>
>>> I have playing with the latest build and found a small problem  
>>> with the libvlc_MediaInstanceReachedEnd event. It is called twice  
>>> after each play. The first time the state is at libvlc_Ended the  
>>> second time the state is at libvlc_Error. This makes it easy to  
>>> differentiate between the two, but I guess this is not the way  
>>> things where intended.
>>>
>>> Jacques Boileau
>>> _______________________________________________
>>> vlc-devel mailing list
>>> To unsubscribe or modify your subscription options:
>>> http://mailman.videolan.org/listinfo/vlc-devel
>>
>>
>> _______________________________________________
>> vlc-devel mailing list
>> To unsubscribe or modify your subscription options:
>> http://mailman.videolan.org/listinfo/vlc-devel
>>
>>
>>
>>
>> -- 
>> Jacques Boileau _______________________________________________
>> vlc-devel mailing list
>> To unsubscribe or modify your subscription options:
>> http://mailman.videolan.org/listinfo/vlc-devel
>
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> http://mailman.videolan.org/listinfo/vlc-devel
>
>
>
>
> -- 
> Jacques Boileau _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> http://mailman.videolan.org/listinfo/vlc-devel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20080115/8a51d902/attachment.html>


More information about the vlc-devel mailing list