]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/bitstream.c
avcodec/dvdsubdec: Fix off-by-one error
[ffmpeg] / libavcodec / bitstream.c
index e3e870ff3e73ad372eca8e895e00b4b717392eee..d041643eff6ec6ab947f409826a1259dbf29c913 100644 (file)
@@ -163,7 +163,7 @@ static int build_table(VLC *vlc, int table_nb_bits, int nb_codes,
     int table_size, table_index, index, code_prefix, symbol, subtable_bits;
     int i, j, k, n, nb, inc;
     uint32_t code;
-    volatile VLC_TYPE (*table)[2];
+    volatile VLC_TYPE (* volatile table)[2]; // the double volatile is needed to prevent a internal compiler error in gcc 4.2
 
     table_size = 1 << table_nb_bits;
     if (table_nb_bits > 30)
@@ -229,7 +229,6 @@ static int build_table(VLC *vlc, int table_nb_bits, int nb_codes,
             /* note: realloc has been done, so reload tables */
             table = (volatile VLC_TYPE (*)[2])&vlc->table[table_index];
             table[j][0] = index; //code
-            av_assert0(table[j][0] == index);
             i = k-1;
         }
     }