Crash after encountering core decoder error

About encoding, codec settings, muxers and filter usage
bdschmidt
New Cone
New Cone
Posts: 5
Joined: 17 Feb 2017 16:31

Crash after encountering core decoder error

Postby bdschmidt » 17 Feb 2017 21:05

I have an app that uses smem to display streaming cameras upon demand. I am experiencing crashes in libavcodec_plugin.dll and thus my program when VLC hits a "cannot continue streaming due to errors" error. The crashes occur when my app tries to release the VLC resources after that error is encountered. The following is my code to initialize VLC.

Code: Select all

char smem_options[256]; void *pUserData = 0; ::sprintf_s(smem_options, "#transcode{vcodec=RV24,acodec=none}:smem{video-postrender-callback=%lld,video-prerender-callback=%lld,video-data=%lld}", (long long int)(intptr_t)(void*)&handleStream, (long long int)(intptr_t)(void*)&prepareRender, (long long int)(intptr_t)(void*)this); const char * const vlc_args[] = { "-I", "dummy", // Don't use any interface "--ignore-config", // Don't use VLC's config "--verbose=2", // (0=only errors and standard messages, 1=warnings, 2=debug). "--sout", smem_options // Stream to memory }; // We launch VLC m_vlcInstance = libvlc_new(sizeof(vlc_args) / sizeof(vlc_args[0]), vlc_args); m_mediaPlayer = libvlc_media_player_new(m_vlcInstance); // Build the URL. std::string urlStr; m_url.ToSingleByte(urlStr); if (m_media) libvlc_media_release(m_media); m_media = libvlc_media_new_location(m_vlcInstance, urlStr.c_str()); if (m_media != NULL) { libvlc_media_player_set_media(m_mediaPlayer, m_media); }
and the following is the code when releasing VLC.

Code: Select all

libvlc_media_player_stop(m_mediaPlayer); libvlc_media_release(m_media); libvlc_media_player_release(m_mediaPlayer); libvlc_release(m_vlcInstance);
The log is as follows:

core libvlc debug: VLC media player - 2.2.5 Weatherwax
core libvlc debug: Copyright © 1996-2017 the VideoLAN team
core libvlc debug: revision 2.2.5-0-g9275f0fefa
core libvlc debug: configured with ../extras/package/win32/../../../configure '--enable-update-check' '--enable-lua' '--enable-faad' '--enable-flac' '--enable-theora' '--enable-twolame' '--enable-quicktime' '--enable-avcodec' '--enable-merge-ffmpeg' '--enable-dca' '--enable-mpc' '--enable-libass' '--enable-x264' '--enable-schroedinger' '--enable-realrtsp' '--enable-live555' '--enable-dvdread' '--enable-shout' '--enable-goom' '--enable-caca' '--disable-sdl' '--enable-qt' '--enable-skins2' '--enable-sse' '--enable-mmx' '--enable-libcddb' '--enable-zvbi' '--disable-telx' '--enable-nls' '--host=x86_64-w64-mingw32' '--enable-debug' 'host_alias=x86_64-w64-mingw32' 'PKG_CONFIG_LIBDIR=/home/jenkins/workspace/vlc-nightly/vlc-stable-nightly-win64-x86_64/vlc/contrib/x86_64-w64-mingw32/lib/pkgconfig'
core libvlc debug: plug-ins loaded: 417 modules
core libvlc debug: translation test: code is "C"
core libvlc debug: CPU has capabilities MMX MMXEXT SSE SSE2 SSE3 SSSE3 SSE4.1 SSE4.2 FPU
core generic debug: creating audio output
core audio output debug: looking for audio output module matching "any": 6 candidates
directsound audio output debug: found 4 devices
core audio output debug: using audio output module "directsound"
core generic debug: keeping audio output
core input debug: Creating an input for 'rtsp://8.15.251.47:1935/rtplive/CityofHampton1'
core stream output debug: using sout chain=`transcode{vcodec=RV24,acodec=none}:smem{video-postrender-callback=8790330056128,video-prerender-callback=8790330056944,video-data=4623030336}'
core stream output debug: stream=`smem'
core stream out debug: looking for sout stream module matching "smem": 22 candidates
core stream out debug: set config option: sout-smem-video-postrender-callback to 8790330056128
core stream out debug: set config option: sout-smem-video-prerender-callback to 8790330056944
core stream out debug: set config option: sout-smem-video-data to 4623030336
core stream out debug: using sout stream module "stream_out_smem"
core stream output debug: stream=`transcode'
core stream out debug: looking for sout stream module matching "transcode": 22 candidates
core stream out debug: set config option: sout-transcode-vcodec to RV24
core stream out debug: set config option: sout-transcode-acodec to none
stream_out_transcode stream out debug: Checking codec mapping for none got none
stream_out_transcode stream out debug: codec audio=none 0Hz 0 channels 96Kb/s
stream_out_transcode stream out debug: Checking video codec mapping for RV24 got RV24
stream_out_transcode stream out debug: codec video=RV24 0x0 scaling: 0.000000 0kb/s
core stream out debug: using sout stream module "stream_out_transcode"
core input debug: using timeshift granularity of 50 MiB, in path 'C:\Users\bschmidt\AppData\Local\Temp'
core input debug: `rtsp://8.15.251.47:1935/rtplive/CityofHampton1' gives access `rtsp' demux `' path `8.15.251.47:1935/rtplive/CityofHampton1'
core input debug: specified demux `any'
core input debug: creating demux: access='rtsp' demux='any' location='8.15.251.47:1935/rtplive/CityofHampton1' file='\\8.15.251.47:1935\rtplive\CityofHampton1'
core demux debug: looking for access_demux module matching "rtsp": 12 candidates
live555 demux debug: version 2016.02.22
core input debug: control type=0
core input debug: control: stopping input
core decoder error: cannot continue streaming due to errors
The thread 0x5b88 has exited with code 0 (0x0).
core decoder debug: removing module "packetizer_h264"
live555 demux debug: RTP subsession 'video/H264'
core decoder debug: killing decoder fourcc `h264', 761 PES in FIFO
core stream output debug: removing a sout input (sout_input:00000003ff44bcf0)
First-chance exception at 0x00000004CDD8795A (libavcodec_plugin.dll) in Azulon.exe: 0xC0000005: Access violation reading location 0xFFFFFFFFFFFFFFFF.
core input debug: selecting program id=0
live555 demux debug: setup start: 0.000000 stop:0.000000
Unhandled exception at 0x00000004CDD8795A (libavcodec_plugin.dll) in Azulon.exe: 0xC0000005: Access violation reading location 0xFFFFFFFFFFFFFFFF.

Is there anyway to prevent the crash? Is this fixed in a newer version? Any ideas are welcome. Thanks!

Return to “VLC stream-output (sout)”

Who is online

Users browsing this forum: No registered users and 3 guests