libvlc produces unclosed handles

This forum is about all development around libVLC.
marranxo
Blank Cone
Blank Cone
Posts: 24
Joined: 03 Jun 2011 11:46

libvlc produces unclosed handles

Postby marranxo » 18 Aug 2011 14:28

Hi, the following sample code produces unclosed handles due to libvlc calls (running on win64 as 32bit program, info collected with perfmon at specific process/handles). Is there any I miss or it's libvlc's fault?

Code: Select all

void MediaPlayerEventHandler(const libvlc_event_t* pEvt, void* pUserData) { switch(pEvt->type) { case libvlc_MediaPlayerEncounteredError: case libvlc_MediaPlayerEndReached: case libvlc_MediaPlayerStopped: printf("Media end\n"); break; case libvlc_MediaPlayerPlaying: printf("Media begin\n"); break; } } void *Lock(void *opaque, void **plane) { *plane = opaque; return NULL; } void Unlock(void *opaque, void *picture, void *const *plane) { } void Display(void *opaque, void *picture) { printf("Display frame\n"); } int main() { const char * const vlc_args[] = { "-I", "--ignore-config", "--plugin-path=./plugins", "--rtsp-caching=150", "--http-caching=150", "--no-osd" }; libvlc_instance_t* m_pVLCInstance = libvlc_new (sizeof(vlc_args) / sizeof(vlc_args[0]), vlc_args); libvlc_media_player_t* m_pMediaPlayer = libvlc_media_player_new(m_pVLCInstance); libvlc_event_manager_t* m_pEvtManager = libvlc_media_player_event_manager(m_pMediaPlayer); libvlc_event_attach(m_pEvtManager, libvlc_MediaPlayerEncounteredError , MediaPlayerEventHandler, NULL); libvlc_event_attach(m_pEvtManager, libvlc_MediaPlayerEndReached, MediaPlayerEventHandler, NULL); libvlc_event_attach(m_pEvtManager, libvlc_MediaPlayerPlaying, MediaPlayerEventHandler, NULL); libvlc_event_attach(m_pEvtManager, libvlc_MediaPlayerStopped, MediaPlayerEventHandler, NULL); libvlc_media_t* m_pMedia = libvlc_media_new_path(m_pVLCInstance, "rtsp://192.168.0.18/fake_server"); libvlc_media_player_set_media (m_pMediaPlayer, m_pMedia); libvlc_video_set_callbacks(m_pMediaPlayer, Lock, Unlock, Display, NULL); libvlc_video_set_format(m_pMediaPlayer, "RGBA", usWidth, usHeight, usWidth * 4); while (true) { libvlc_media_player_play (m_pMediaPlayer); Sleep(1000); libvlc_media_player_stop (m_pMediaPlayer); Sleep(1000); } return 0; }

Rémi Denis-Courmont
Developer
Developer
Posts: 15248
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: libvlc produces unclosed handles

Postby Rémi Denis-Courmont » 18 Aug 2011 15:32

This is a known bug http://trac.videolan.org/vlc/ticket/5030 in dire need of an assignee.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

marranxo
Blank Cone
Blank Cone
Posts: 24
Joined: 03 Jun 2011 11:46

Re: libvlc produces unclosed handles

Postby marranxo » 18 Aug 2011 16:37

Oh... damn


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 3 guests