Page 1 of 1

libvlc_media_player_pause() crashs with YUV video formats

Posted: 13 Oct 2014 11:03
by Inarus
I develop under Windows 7 (VS 2008) using the precompiled libvlc 2.1.2 from ftp server
(same problem with other versions).

To retrieve a video frame from file i go the normal way by using:

Code: Select all

_pMedia=libvlc_media_new_path( _pLibInstance, fileName); libvlc_media_player_set_media( _pMediaPlayer, _pMedia); libvlc_video_set_callbacks( _pMediaPlayer, LockCB, UnlockCB, DisplayCB, (void*)&_CBData); libvlc_video_set_format( _pMediaPlayer, "UYVY", vidImgW, vidImgH, bytePerLn); libvlc_media_player_play(_pMediaPlayer);
All works fine until libvlc_media_player_pause(_pMediaPlayer) will be called.

Callstack for 64bit application:
  • libi420_yuy2_sse2_plugin.dll!000000006a142c45()
    libvlccore.dll!000000007073acbc()
    libvlccore.dll!000000007073b5b6()
    libvlccore.dll!0000000070706c9b()
    libvlccore.dll!0000000070707543()
    libvlccore.dll!000000007073f4a2()
    msvcrt.dll!000007feff91415f()
    msvcrt.dll!000007feff916ebd()
    kernel32.dll!00000000774959ed()
    ntdll.dll!00000000776cc541()
Callstack for 32bit application:
  • libi420_yuy2_sse2_plugin.dll!659b3354()
    ntdll.dll!778a015d()
    msvcrt.dll!753d1328()
    kernel32.dll!7699338a()
    ntdll.dll!778b9f72()
    ntdll.dll!778b9f45()
- same result with "YUY2"
- removing libi420_yuy2_sse2_plugin.dll plugin from the plugin tree leads to a crash of the libi420_yuy2_mmx_plugin.dll plugin


Any idea?

Thanks in advance for your time, and sorry for my poor english.

Re: libvlc_media_player_pause() crashs with YUV video format

Posted: 13 Oct 2014 11:11
by RSATom
Don't think somebody could help you without call stack with functions names...
You could install latest QtCreator with mingw toolset + debug vlc build (http://nightlies.videolan.org/build/win ... 2-debug.7z for example) to get call stack to understand crash reason... - it's IMHO the easiest way if you don't know how to use gdb...

Re: libvlc_media_player_pause() crashs with YUV video format

Posted: 13 Oct 2014 12:05
by RĂ©mi Denis-Courmont
This is most likely a bug in the LockCB() function.

Re: libvlc_media_player_pause() crashs with YUV video format

Posted: 14 Oct 2014 09:36
by Inarus
Thank you very much for the quick and worthwhile reply.
I have identified the problem inside the LockCB() callback.
In case of the media player was not in libvlc_Playing state ( libvlc_media_player_get_state() ),
i had set the returned pixel plane pointer to NULL.
As the using of "GREY", "RV16", "RV24", "RV32", ... accept this approach, the using of
YUV formats leads to a crash in that case.
The using of a valid pointer in each case the LockCB() is called, fix the problem.

@RSATom I've tried to use the libvlc version you have suggested. But the plugins of interest (SSE, MMX)
are not part of this package. So i'm not able to give you detailed crash informations.

Thanks again.
Have a nice and productive day.

Re: libvlc_media_player_pause() crashs with YUV video format

Posted: 14 Oct 2014 09:39
by RSATom
There are many other versions there ( http://nightlies.videolan.org/build/win32/ ), but you already solved your problem, so it doesn't matter...