]> git.sesse.net Git - vlc/commitdiff
Be more strict in flac SyncInfo checks.
authorLaurent Aimar <fenrir@videolan.org>
Sat, 13 Feb 2010 14:10:50 +0000 (15:10 +0100)
committerLaurent Aimar <fenrir@videolan.org>
Sat, 13 Feb 2010 14:12:00 +0000 (15:12 +0100)
modules/packetizer/flac.c

index c001ea73e87be14e44f802b393d4a3806b119d1d..a1a3c3b2ad526219054864eb1717e765c8ffba57 100644 (file)
@@ -600,6 +600,10 @@ static int SyncInfo( decoder_t *p_dec, uint8_t *p_buf,
         if( i_blocksize < p_sys->stream_info.min_blocksize ||
             i_blocksize > p_sys->stream_info.max_blocksize )
             return 0;
+        if( *pi_bits_per_sample != p_sys->stream_info.bits_per_sample )
+            return 0;
+        if( *pi_sample_rate != p_sys->stream_info.sample_rate )
+            return 0;
     }
     return i_blocksize;
 }