[bTSstream-devel] [Git][videolan/bitstream][master] desc_81: Fix compilation with older compilers
    Christophe Massiot 
    gitlab at videolan.org
       
    Mon Oct 26 23:44:16 CET 2020
    
    
  
Christophe Massiot pushed to branch master at VideoLAN / bitstream
Commits:
090095e4 by Georgi Chorbadzhiyski at 2020-10-26T23:43:23+01:00
desc_81: Fix compilation with older compilers
The attached fixes the following error when compiling 'dvblastctl'
  /usr/local/include/bitstream/atsc/si/desc_81.h: In function ‘desc81_bit_rate_code_from_octetrate’:
  /usr/local/include/bitstream/atsc/si/desc_81.h:83:5: error: ‘for’ loop initial declarations are only allowed in C99 mode
  /usr/local/include/bitstream/atsc/si/desc_81.h:83:5: note: use option -std=c99 or -std=gnu99 to compile your code
Apply via 'git am 0001-desc_81-Fix-compilation-with-older-compilers.patch'
- - - - -
1 changed file:
- atsc/si/desc_81.h
Changes:
=====================================
atsc/si/desc_81.h
=====================================
@@ -80,7 +80,8 @@ static inline uint8_t desc81_bit_rate_code_from_octetrate(uint64_t octetrate)
         256, 320, 384, 448, 512, 576,
         640,
     };
-    for (unsigned i = 0; i < 19; i++) {
+    unsigned i;
+    for (i = 0; i < 19; i++) {
         if (octetrate * 8 == table[i] * 1000)
             return i;
         else if (octetrate * 8 < table[i] * 1000)
View it on GitLab: https://code.videolan.org/videolan/bitstream/-/commit/090095e44be43d86b4ad2dc23e0a682dce394335
-- 
View it on GitLab: https://code.videolan.org/videolan/bitstream/-/commit/090095e44be43d86b4ad2dc23e0a682dce394335
You're receiving this email because of your account on code.videolan.org.
    
    
More information about the biTStream-devel
mailing list