]> git.sesse.net Git - vlc/blobdiff - modules/demux/mjpeg.c
Added Malay translation
[vlc] / modules / demux / mjpeg.c
index f614da2c872c4c4717d8427da3f98a1f810d2754..67824c98027dff6174f5ea4508b0da810b99e7cd 100644 (file)
@@ -157,7 +157,7 @@ static char* GetLine( demux_t *p_demux, int *p_pos )
         msg_Err( p_demux, "out of memory" );
         return NULL;
     }
-    strncpy ( p_line, p_buf, i );
+    strncpy ( p_line, (char*)p_buf, i );
     p_line[i] = '\0';
 //    msg_Dbg( p_demux, "i = %d, pos = %d, %s", i, *p_pos, p_line );
     return p_line;
@@ -215,8 +215,8 @@ static vlc_bool_t 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 );
         }
-        free( psz_line );
     }
+    free( psz_line );
     psz_line = GetLine( p_demux, &i_pos );
     while( psz_line && *psz_line )
     {