]> git.sesse.net Git - vlc/blobdiff - modules/demux/opus.h
opus: fix duration signedness
[vlc] / modules / demux / opus.h
index 9721bc17a64e65797c661c1e0c5685ea2f50b026..7365e2e6d5e58ce2c97796f65dcf260e4f579631 100644 (file)
 
 /* Returns Opus frame duration in samples */
 
-static inline int opus_frame_duration(unsigned char *data, long len)
+static inline unsigned opus_frame_duration(unsigned char *data, long len)
 {
     static const int silk_fs_div[4] = { 6000, 3000, 1500, 1000 };
-    int toc;
-    int nframes;
-    int frame_size;
-    int nsamples;
-    int i_rate;
+    unsigned toc;
+    unsigned nframes;
+    unsigned frame_size;
+    unsigned nsamples;
+    unsigned i_rate;
     if( len < 1 )
         return 0;
     toc = data[0];