[vlc-devel] commit: Be more strict in flac SyncInfo checks. (Laurent Aimar )

git version control git at videolan.org
Sat Feb 13 15:12:22 CET 2010


vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Sat Feb 13 15:10:50 2010 +0100| [74ec041dace007ea5c960f9503cff3990ae30c3e] | committer: Laurent Aimar 

Be more strict in flac SyncInfo checks.

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

 modules/packetizer/flac.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/modules/packetizer/flac.c b/modules/packetizer/flac.c
index c001ea7..a1a3c3b 100644
--- a/modules/packetizer/flac.c
+++ b/modules/packetizer/flac.c
@@ -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;
 }




More information about the vlc-devel mailing list