[vlc-commits] mjpeg: fix incorrect vlc_object_t pointer usage

Steve Lhomme git at videolan.org
Mon Jun 8 13:27:38 CEST 2020


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Mon Jun  8 13:27:21 2020 +0200| [78c5634afa7587a4e22b27e6cdf6050bcd667f6c] | committer: Steve Lhomme

mjpeg: fix incorrect vlc_object_t pointer usage

"passing argument 1 of ‘vlc_obj_malloc’ from incompatible pointer type"
"expected ‘vlc_object_t *’ {aka ‘struct vlc_object_t *’} but argument is of type ‘demux_t *’"

Warnings introduced in

9a55abf4e2b9f37d577152df0cb3962b29e55002

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=78c5634afa7587a4e22b27e6cdf6050bcd667f6c
---

 modules/demux/mjpeg.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/modules/demux/mjpeg.c b/modules/demux/mjpeg.c
index be5eef4536..82ae175725 100644
--- a/modules/demux/mjpeg.c
+++ b/modules/demux/mjpeg.c
@@ -151,7 +151,7 @@ static char* GetLine( demux_t *p_demux, int *p_pos )
     {
         i--;
     }
-    p_line = vlc_obj_malloc( p_demux, i + 1 );
+    p_line = vlc_obj_malloc( VLC_OBJECT(p_demux), i + 1 );
     if( unlikely( p_line == NULL ) )
         return NULL;
     strncpy ( p_line, (char*)p_buf, i );
@@ -214,7 +214,7 @@ static bool CheckMimeHeader( demux_t *p_demux, int *p_header_size )
                 msg_Warn( p_demux, "separator %s does not match %s", psz_line,
                           p_sys->psz_separator );
             }
-            vlc_obj_free( p_demux, psz_line );
+            vlc_obj_free( VLC_OBJECT(p_demux), psz_line );
         }
     }
 
@@ -239,7 +239,7 @@ static bool CheckMimeHeader( demux_t *p_demux, int *p_header_size )
         {
             msg_Dbg( p_demux, "discard MIME header: %s", psz_line );
         }
-        vlc_obj_free( p_demux, psz_line );
+        vlc_obj_free( VLC_OBJECT(p_demux), psz_line );
         psz_line = GetLine( p_demux, &i_pos );
     }
 
@@ -249,7 +249,7 @@ static bool CheckMimeHeader( demux_t *p_demux, int *p_header_size )
         return false;
     }
 
-    vlc_obj_free( p_demux, psz_line );
+    vlc_obj_free( VLC_OBJECT(p_demux), psz_line );
 
     *p_header_size = i_pos;
     return b_jpeg;



More information about the vlc-commits mailing list