[vlc-commits] [Git][videolan/vlc][master] 9 commits: waveout: fix pointer conversion warning

Jean-Baptiste Kempf (@jbk) gitlab at videolan.org
Wed Apr 6 07:39:46 UTC 2022



Jean-Baptiste Kempf pushed to branch master at VideoLAN / VLC


Commits:
aa01a9de by Steve Lhomme at 2022-04-06T07:25:36+00:00
waveout: fix pointer conversion warning

When calling aout_DrainedReport().

- - - - -
7c5cc30b by Steve Lhomme at 2022-04-06T07:25:36+00:00
hw:d3d11: check the unlikely failure of using a shared texture

- - - - -
e48fc2ac by Steve Lhomme at 2022-04-06T07:25:36+00:00
sout: sdi: remove unused variable

- - - - -
e67935d9 by Steve Lhomme at 2022-04-06T07:25:36+00:00
demux: ogg: remove write-only variables

Not sure why we don't keep the index values...

- - - - -
8ce1899c by Steve Lhomme at 2022-04-06T07:25:36+00:00
panoramix: remove write-only variables

- - - - -
beb4dd03 by Steve Lhomme at 2022-04-06T07:25:36+00:00
sout: sdi: remove unused function

- - - - -
509bc6b8 by Steve Lhomme at 2022-04-06T07:25:36+00:00
skins2: remove unused variables in win32 classes

- - - - -
d20f3e15 by Steve Lhomme at 2022-04-06T07:25:36+00:00
skins2: fix warning in debug message

- - - - -
ff5e2f7b by Steve Lhomme at 2022-04-06T07:25:36+00:00
srt: use srt_create_socket() instead of deprecated srt_socket()

The call is available since libsrt 1.3.0 which is the minimum we allow in
configure.

- - - - -


14 changed files:

- modules/access/srt.c
- modules/access_output/srt.c
- modules/audio_output/waveout.c
- modules/demux/ogg.c
- modules/gui/skins2/win32/win32_dragdrop.cpp
- modules/gui/skins2/win32/win32_dragdrop.hpp
- modules/gui/skins2/win32/win32_factory.cpp
- modules/gui/skins2/win32/win32_factory.hpp
- modules/gui/skins2/win32/win32_window.cpp
- modules/gui/skins2/win32/win32_window.hpp
- modules/hw/d3d11/d3d11_decoder.cpp
- modules/stream_out/sdi/Ancillary.cpp
- modules/stream_out/sdi/SDIAudioMultiplex.hpp
- modules/video_splitter/panoramix.c


Changes:

=====================================
modules/access/srt.c
=====================================
@@ -126,7 +126,7 @@ static bool srt_schedule_reconnect(stream_t *p_stream)
         srt_close( p_sys->sock );
     }
 
-    p_sys->sock = srt_socket( res->ai_family, SOCK_DGRAM, 0 );
+    p_sys->sock = srt_create_socket( );
     if ( p_sys->sock == SRT_INVALID_SOCK )
     {
         msg_Err( p_stream, "Failed to open socket." );


=====================================
modules/access_output/srt.c
=====================================
@@ -121,7 +121,7 @@ static bool srt_schedule_reconnect(sout_access_out_t *p_access)
         srt_close( p_sys->sock );
     }
 
-    p_sys->sock = srt_socket( res->ai_family, SOCK_DGRAM, 0 );
+    p_sys->sock = srt_create_socket( );
     if ( p_sys->sock == SRT_INVALID_SOCK )
     {
         msg_Err( p_access, "Failed to open socket." );


=====================================
modules/audio_output/waveout.c
=====================================
@@ -643,7 +643,8 @@ static void CALLBACK WaveOutCallback( HWAVEOUT h_waveout, UINT uMsg,
 {
     (void) h_waveout;
     (void) dwParam2;
-    aout_sys_t *sys = ((audio_output_t *)_p_aout)->sys;
+    audio_output_t *p_aout = (audio_output_t *)_p_aout;
+    aout_sys_t *sys = p_aout->sys;
     struct lkwavehdr * p_waveheader =  (struct lkwavehdr *) dwParam1;
 
     if( uMsg != WOM_DONE ) return;
@@ -655,7 +656,7 @@ static void CALLBACK WaveOutCallback( HWAVEOUT h_waveout, UINT uMsg,
 
     if( sys->i_frames == 0 && sys->draining )
     {
-        aout_DrainedReport( _p_aout );
+        aout_DrainedReport( p_aout );
         sys->draining = false;
     }
 


=====================================
modules/demux/ogg.c
=====================================
@@ -3297,17 +3297,13 @@ static void Ogg_ReadSkeletonIndex( demux_t *p_demux, ogg_packet *p_oggpacket )
     p_stream->p_skel->i_indexlastnum = GetQWLE( &p_oggpacket->packet[32] );
     unsigned const char *p_fwdbyte = &p_oggpacket->packet[42];
     unsigned const char *p_boundary = p_oggpacket->packet + p_oggpacket->bytes;
-    uint64_t i_offset = 0;
-    uint64_t i_time = 0;
     uint64_t i_keypoints_found = 0;
 
     while( p_fwdbyte < p_boundary && i_keypoints_found < i_keypoints )
     {
         uint64_t i_val;
         p_fwdbyte = Read7BitsVariableLE( p_fwdbyte, p_boundary, &i_val );
-        i_offset += i_val;
         p_fwdbyte = Read7BitsVariableLE( p_fwdbyte, p_boundary, &i_val );
-        i_time += i_val * p_stream->p_skel->i_indexstampden;
         i_keypoints_found++;
     }
 


=====================================
modules/gui/skins2/win32/win32_dragdrop.cpp
=====================================
@@ -31,9 +31,9 @@
 
 
 Win32DragDrop::Win32DragDrop( intf_thread_t *pIntf,
-                              bool playOnDrop, GenericWindow* pWin )
+                              GenericWindow* pWin )
     : SkinObject( pIntf ), IDropTarget(), m_references( 1 ),
-      m_playOnDrop( playOnDrop ), m_pWin( pWin), m_format( { 0, NULL} )
+      m_pWin( pWin), m_format( { 0, NULL} )
 {
 }
 


=====================================
modules/gui/skins2/win32/win32_dragdrop.hpp
=====================================
@@ -39,7 +39,7 @@
 class Win32DragDrop: public SkinObject, public IDropTarget
 {
 public:
-   Win32DragDrop( intf_thread_t *pIntf, bool playOnDrop, GenericWindow* pWin );
+   Win32DragDrop( intf_thread_t *pIntf, GenericWindow* pWin );
    virtual ~Win32DragDrop() { }
 
 protected:
@@ -59,8 +59,6 @@ protected:
 private:
     /// Internal reference counter
     LONG m_references;
-    /// Indicates whether the file(s) must be played immediately
-    bool m_playOnDrop;
     /// Window associated
     GenericWindow* m_pWin;
     /// format used for DrapNDrop


=====================================
modules/gui/skins2/win32/win32_factory.cpp
=====================================
@@ -87,7 +87,7 @@ LRESULT CALLBACK Win32Factory::Win32Proc( HWND hwnd, UINT uMsg,
             }
             else
             {
-                msg_Dbg( p_intf, "WM_SYSCOMMAND %i", (wParam  & 0xFFF0) );
+                msg_Dbg( p_intf, "WM_SYSCOMMAND %i", (int)(wParam  & 0xFFF0) );
             }
         }
         // Handle systray notifications
@@ -339,11 +339,11 @@ OSTimer *Win32Factory::createOSTimer( CmdGeneric &rCmd )
 
 
 OSWindow *Win32Factory::createOSWindow( GenericWindow &rWindow, bool dragDrop,
-                                        bool playOnDrop, OSWindow *pParent,
+                                        bool, OSWindow *pParent,
                                         GenericWindow::WindowType_t type )
 {
     return new Win32Window( getIntf(), rWindow, m_hInst, m_hParentWindow,
-                            dragDrop, playOnDrop, (Win32Window*)pParent, type );
+                            dragDrop, (Win32Window*)pParent, type );
 }
 
 


=====================================
modules/gui/skins2/win32/win32_factory.hpp
=====================================
@@ -139,10 +139,6 @@ private:
     HWND m_hParentWindow;
     /// Structure for the system tray
     NOTIFYICONDATA m_trayIcon;
-    /// Handle on msimg32.dll (for TransparentBlt)
-    HINSTANCE m_hMsimg32;
-    /// Handle on user32.dll (for SetLayeredWindowAttributes)
-    HINSTANCE m_hUser32;
     /// Directory separator
     const std::string m_dirSep;
     /// Resource path


=====================================
modules/gui/skins2/win32/win32_window.cpp
=====================================
@@ -45,11 +45,11 @@
 
 Win32Window::Win32Window( intf_thread_t *pIntf, GenericWindow &rWindow,
                           HINSTANCE hInst, HWND hParentWindow,
-                          bool dragDrop, bool playOnDrop,
+                          bool dragDrop,
                           Win32Window *pParentWindow,
                           GenericWindow::WindowType_t type ):
     OSWindow( pIntf ), m_dragDrop( dragDrop ), m_isLayered( false ),
-    m_pParent( pParentWindow ), m_type ( type )
+    m_type ( type )
 {
     (void)hParentWindow;
     Win32Factory *pFactory = (Win32Factory*)Win32Factory::instance( getIntf() );
@@ -113,7 +113,7 @@ Win32Window::Win32Window( intf_thread_t *pIntf, GenericWindow &rWindow,
     if( m_dragDrop )
     {
         m_pDropTarget = (LPDROPTARGET)
-            new Win32DragDrop( getIntf(), playOnDrop, &rWindow );
+            new Win32DragDrop( getIntf(), &rWindow );
         // Register the window as a drop target
         RegisterDragDrop( m_hWnd, m_pDropTarget );
     }


=====================================
modules/gui/skins2/win32/win32_window.hpp
=====================================
@@ -39,7 +39,7 @@ class Win32Window: public OSWindow
 public:
     Win32Window( intf_thread_t *pIntf, GenericWindow &rWindow,
                  HINSTANCE hInst, HWND hParentWindow,
-                 bool dragDrop, bool playOnDrop,
+                 bool dragDrop,
                  Win32Window *pParentWindow, GenericWindow::WindowType_t );
     virtual ~Win32Window();
 
@@ -88,8 +88,6 @@ private:
     LPDROPTARGET m_pDropTarget;
     /// Indicates whether the window is layered
     mutable bool m_isLayered;
-    /// Parent window
-    Win32Window *m_pParent;
     /// window type
     GenericWindow::WindowType_t m_type;
 


=====================================
modules/hw/d3d11/d3d11_decoder.cpp
=====================================
@@ -173,6 +173,11 @@ static int DecodeFrame( decoder_t *p_dec, block_t *p_block )
 
     ID3D11Texture2D* sharedTex;
     hr = d3d11VLC1->OpenSharedResource1(pic_sys->sharedHandle, IID_GRAPHICS_PPV_ARGS(&sharedTex));
+    if (unlikely(FAILED(hr)))
+    {
+        block_Release( p_block );
+        return VLCDEC_SUCCESS;
+    }
 
     ID3D11Texture2D *srcTex = src_sys->texture[0];
     auto *srcVctx = p_pic->context->vctx;


=====================================
modules/stream_out/sdi/Ancillary.cpp
=====================================
@@ -69,12 +69,6 @@ AFD::~AFD()
 
 }
 
-static inline void put_le32(uint8_t **p, uint32_t d)
-{
-    SetDWLE(*p, d);
-    (*p) += 4;
-}
-
 AFD::AFDData::AFDData(uint8_t code, uint8_t ar)
 {
     payload.resize(8);


=====================================
modules/stream_out/sdi/SDIAudioMultiplex.hpp
=====================================
@@ -109,7 +109,6 @@ namespace sdi_sout
 
         private:
             vlc_object_t *p_obj;
-            unsigned count;
             AES3AudioFrameSource framesources[MAX_AES3_AUDIO_FRAMES];
     };
 }


=====================================
modules/video_splitter/panoramix.c
=====================================
@@ -835,7 +835,7 @@ static int Configuration( panoramix_output_t pp_output[ROW_MAX][COL_MAX],
 
     /* */
     int i_output = 0;
-    for( int y = 0, i_src_y = 0, i_dst_y = 0; y < i_row; y++ )
+    for( int y = 0, i_src_y = 0; y < i_row; y++ )
     {
         const bool b_row_first = y == 0;
         const bool b_row_last  = y == i_row - 1;
@@ -845,7 +845,7 @@ static int Configuration( panoramix_output_t pp_output[ROW_MAX][COL_MAX],
         if( b_row_last )
             i_win_height = i_src_height - y * i_win_height;
 
-        for( int x = 0, i_src_x = 0, i_dst_x = 0; x < i_col; x++ )
+        for( int x = 0, i_src_x = 0; x < i_col; x++ )
         {
             const bool b_col_first = x == 0;
             const bool b_col_last  = x == i_col - 1;
@@ -910,10 +910,8 @@ static int Configuration( panoramix_output_t pp_output[ROW_MAX][COL_MAX],
 
             /* */
             i_src_x += i_win_width;
-            i_dst_x += p_output->i_width;
         }
         i_src_y += i_win_height;
-        i_dst_y += pp_output[0][y].i_height;
     }
     return i_output;
 }



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/9f1a32a0414a04c2ebd011b8c95a3df35456795b...ff5e2f7b8846d80b588fb649b22eccf7269dd179

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/9f1a32a0414a04c2ebd011b8c95a3df35456795b...ff5e2f7b8846d80b588fb649b22eccf7269dd179
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list