Commit 9bcabfda authored by Cyril Deguet's avatar Cyril Deguet

* libvlc.c: don't crash in vlc_iconv if vlc_iconv_open failed

 * sap.c: compilation fix
 * win32_graphics.cpp: avoid multiple #define
parent 6c1ee3a2
...@@ -25,15 +25,16 @@ ...@@ -25,15 +25,16 @@
#ifdef WIN32_SKINS #ifdef WIN32_SKINS
#define WINVER 0x500 #define WINVER 0x500
#ifndef AC_SRC_ALPHA
#define AC_SRC_ALPHA 1
#endif
#include "win32_factory.hpp" #include "win32_factory.hpp"
#include "win32_graphics.hpp" #include "win32_graphics.hpp"
#include "win32_window.hpp" #include "win32_window.hpp"
#include "../src/generic_bitmap.hpp" #include "../src/generic_bitmap.hpp"
#ifndef AC_SRC_ALPHA
#define AC_SRC_ALPHA 1
#endif
Win32Graphics::Win32Graphics( intf_thread_t *pIntf, int width, int height ): Win32Graphics::Win32Graphics( intf_thread_t *pIntf, int width, int height ):
OSGraphics( pIntf ), m_width( width ), m_height( height ), m_hDC( NULL ) OSGraphics( pIntf ), m_width( width ), m_height( height ), m_hDC( NULL )
{ {
......
...@@ -1843,6 +1843,12 @@ static void LocaleInit( void ) ...@@ -1843,6 +1843,12 @@ static void LocaleInit( void )
vlc_mutex_init( p_libvlc, &libvlc.to_locale_lock ); vlc_mutex_init( p_libvlc, &libvlc.to_locale_lock );
libvlc.from_locale = vlc_iconv_open( "UTF-8", psz_charset ); libvlc.from_locale = vlc_iconv_open( "UTF-8", psz_charset );
libvlc.to_locale = vlc_iconv_open( psz_charset, "UTF-8" ); libvlc.to_locale = vlc_iconv_open( psz_charset, "UTF-8" );
if( !libvlc.to_locale )
{
// Not sure it is the right thing to do, but at least it
// doesn't make vlc crash with msvc !
libvlc.to_locale = (vlc_iconv_t)(-1);
}
} }
else else
libvlc.from_locale = libvlc.to_locale = (vlc_iconv_t)(-1); libvlc.from_locale = libvlc.to_locale = (vlc_iconv_t)(-1);
......
...@@ -620,7 +620,7 @@ static char *SDPGenerate( sap_handler_t *p_sap, ...@@ -620,7 +620,7 @@ static char *SDPGenerate( sap_handler_t *p_sap,
psz_uri, p_session->i_ttl, psz_uri, p_session->i_ttl,
p_session->i_port, p_session->i_payload, p_session->i_port, p_session->i_payload,
psz_group ? "a=x-plgroup:" : "", psz_group ? "a=x-plgroup:" : "",
psz_group ?: "", psz_group ? "\r\n" : "" ) == -1 ) psz_group ? psz_group : "", psz_group ? "\r\n" : "" ) == -1 )
return NULL; return NULL;
msg_Dbg( p_sap, "Generated SDP (%i bytes):\n%s", strlen(psz_sdp), msg_Dbg( p_sap, "Generated SDP (%i bytes):\n%s", strlen(psz_sdp),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment