]> git.sesse.net Git - vlc/blobdiff - modules/demux/a52.c
[14752] improved, by Daniel Stranger.
[vlc] / modules / demux / a52.c
index 9d7c8af1214e5cda3b2ae3e26b04bcbe831460f3..710d74216198c0945a45497f12ab6e34fa1e95b5 100644 (file)
@@ -18,7 +18,7 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 /*****************************************************************************
@@ -81,18 +81,18 @@ static int Open( vlc_object_t * p_this )
     demux_sys_t *p_sys;
     byte_t      *p_peek;
     int         i_peek = 0;
-    vlc_bool_t  b_big_endian;
+    vlc_bool_t  b_big_endian = 0; /* Arbitrary initialisation */
 
     /* Check if we are dealing with a WAV file */
     if( stream_Peek( p_demux->s, &p_peek, 12 ) == 12 &&
-        !strncmp( p_peek, "RIFF", 4 ) && !strncmp( &p_peek[8], "WAVE", 4 ) )
+        !memcmp( p_peek, "RIFF", 4 ) && !memcmp( p_peek + 8, "WAVE", 4 ) )
     {
         int i_size;
 
         /* Skip the wave header */
         i_peek = 12 + 8;
         while( stream_Peek( p_demux->s, &p_peek, i_peek ) == i_peek &&
-               strncmp( p_peek + i_peek - 8, "data", 4 ) )
+               memcmp( p_peek + i_peek - 8, "data", 4 ) )
         {
             i_peek += GetDWLE( p_peek + i_peek - 4 ) + 8;
         }