libavcodec/qdm2.c:1235: error: Null Dereference
  pointer `&gb->buffer` last assigned on line 1232 could be null and is dereferenced by call to `get_bits()` at line 1235, column 26.

libavcodec/qdm2.c:1204:1: start of procedure qdm2_decode_super_block()
1202.  * @param q    context
1203.  */
1204. static void qdm2_decode_super_block (QDM2Context *q)
      ^
1205. {
1206.     GetBitContext gb;

libavcodec/qdm2.c:1209:5: 
1207.     QDM2SubPacket header, *packet;
1208.     int i, packet_bytes, sub_packet_size, sub_packets_D;
1209.     unsigned int next_index = 0;
          ^
1210. 
1211.     memset(q->tone_level_idx_hi1, 0, sizeof(q->tone_level_idx_hi1));

libavcodec/qdm2.c:1211:5: 
1209.     unsigned int next_index = 0;
1210. 
1211.     memset(q->tone_level_idx_hi1, 0, sizeof(q->tone_level_idx_hi1));
          ^
1212.     memset(q->tone_level_idx_mid, 0, sizeof(q->tone_level_idx_mid));
1213.     memset(q->tone_level_idx_hi2, 0, sizeof(q->tone_level_idx_hi2));

libavcodec/qdm2.c:1212:5: 
1210. 
1211.     memset(q->tone_level_idx_hi1, 0, sizeof(q->tone_level_idx_hi1));
1212.     memset(q->tone_level_idx_mid, 0, sizeof(q->tone_level_idx_mid));
          ^
1213.     memset(q->tone_level_idx_hi2, 0, sizeof(q->tone_level_idx_hi2));
1214. 

libavcodec/qdm2.c:1213:5: 
1211.     memset(q->tone_level_idx_hi1, 0, sizeof(q->tone_level_idx_hi1));
1212.     memset(q->tone_level_idx_mid, 0, sizeof(q->tone_level_idx_mid));
1213.     memset(q->tone_level_idx_hi2, 0, sizeof(q->tone_level_idx_hi2));
          ^
1214. 
1215.     q->sub_packets_B = 0;

libavcodec/qdm2.c:1215:5: 
1213.     memset(q->tone_level_idx_hi2, 0, sizeof(q->tone_level_idx_hi2));
1214. 
1215.     q->sub_packets_B = 0;
          ^
1216.     sub_packets_D = 0;
1217. 

libavcodec/qdm2.c:1216:5: 
1214. 
1215.     q->sub_packets_B = 0;
1216.     sub_packets_D = 0;
          ^
1217. 
1218.     average_quantized_coeffs(q); // average elements in quantized_coeffs[max_ch][10][8]

libavcodec/qdm2.c:1218:5: Skipping average_quantized_coeffs(): empty list of specs
1216.     sub_packets_D = 0;
1217. 
1218.     average_quantized_coeffs(q); // average elements in quantized_coeffs[max_ch][10][8]
          ^
1219. 
1220.     init_get_bits(&gb, q->compressed_data, q->compressed_size*8);

libavcodec/qdm2.c:1220:5: 
1218.     average_quantized_coeffs(q); // average elements in quantized_coeffs[max_ch][10][8]
1219. 
1220.     init_get_bits(&gb, q->compressed_data, q->compressed_size*8);
          ^
1221.     qdm2_decode_sub_packet_header(&gb, &header);
1222. 

libavcodec/bitstream.h:737:1: start of procedure init_get_bits()
  735.  * @param bit_size the size of the buffer in bits
  736.  */
  737. static inline void init_get_bits(GetBitContext *s,
       ^
  738.                    const uint8_t *buffer, int bit_size)
  739. {

libavcodec/bitstream.h:740:5: 
  738.                    const uint8_t *buffer, int bit_size)
  739. {
  740.     int buffer_size= (bit_size+7)>>3;
           ^
  741.     if(buffer_size < 0 || bit_size < 0) {
  742.         buffer_size = bit_size = 0;

libavcodec/bitstream.h:741:8: Taking false branch
  739. {
  740.     int buffer_size= (bit_size+7)>>3;
  741.     if(buffer_size < 0 || bit_size < 0) {
              ^
  742.         buffer_size = bit_size = 0;
  743.         buffer = NULL;

libavcodec/bitstream.h:741:27: Taking false branch
  739. {
  740.     int buffer_size= (bit_size+7)>>3;
  741.     if(buffer_size < 0 || bit_size < 0) {
                                 ^
  742.         buffer_size = bit_size = 0;
  743.         buffer = NULL;

libavcodec/bitstream.h:746:5: 
  744.     }
  745. 
  746.     s->buffer= buffer;
           ^
  747.     s->size_in_bits= bit_size;
  748.     s->buffer_end= buffer + buffer_size;

libavcodec/bitstream.h:747:5: 
  745. 
  746.     s->buffer= buffer;
  747.     s->size_in_bits= bit_size;
           ^
  748.     s->buffer_end= buffer + buffer_size;
  749. #ifdef ALT_BITSTREAM_READER

libavcodec/bitstream.h:748:5: 
  746.     s->buffer= buffer;
  747.     s->size_in_bits= bit_size;
  748.     s->buffer_end= buffer + buffer_size;
           ^
  749. #ifdef ALT_BITSTREAM_READER
  750.     s->index=0;

libavcodec/bitstream.h:750:5: 
  748.     s->buffer_end= buffer + buffer_size;
  749. #ifdef ALT_BITSTREAM_READER
  750.     s->index=0;
           ^
  751. #elif defined LIBMPEG2_BITSTREAM_READER
  752.     s->buffer_ptr = (uint8_t*)((intptr_t)buffer&(~1));

libavcodec/bitstream.h:760:1: return from a call to init_get_bits
  758.     skip_bits_long(s, 0);
  759. #endif
  760. }
       ^
  761. 
  762. static inline void align_get_bits(GetBitContext *s)

libavcodec/qdm2.c:1221:5: 
1219. 
1220.     init_get_bits(&gb, q->compressed_data, q->compressed_size*8);
1221.     qdm2_decode_sub_packet_header(&gb, &header);
          ^
1222. 
1223.     if (header.type < 2 || header.type >= 8) {

libavcodec/qdm2.c:414:1: start of procedure qdm2_decode_sub_packet_header()
  412.  * @param sub_packet    packet under analysis
  413.  */
  414. static void qdm2_decode_sub_packet_header (GetBitContext *gb, QDM2SubPacket *sub_packet)
       ^
  415. {
  416.     sub_packet->type = get_bits (gb, 8);

libavcodec/qdm2.c:416:5: 
  414. static void qdm2_decode_sub_packet_header (GetBitContext *gb, QDM2SubPacket *sub_packet)
  415. {
  416.     sub_packet->type = get_bits (gb, 8);
           ^
  417. 
  418.     if (sub_packet->type == 0) {

libavcodec/bitstream.h:634:1: start of procedure get_bits()
    632.  * Note, the alt bitstream reader can read up to 25 bits, but the libmpeg2 reader can't
    633.  */
    634. static inline unsigned int get_bits(GetBitContext *s, int n){
         ^
    635.     register int tmp;
    636.     OPEN_READER(re, s)

libavcodec/bitstream.h:636:5: 
    634. static inline unsigned int get_bits(GetBitContext *s, int n){
    635.     register int tmp;
    636.     OPEN_READER(re, s)
             ^
    637.     UPDATE_CACHE(re, s)
    638.     tmp= SHOW_UBITS(re, s, n);

libavcodec/bitstream.h:637:5: 
    635.     register int tmp;
    636.     OPEN_READER(re, s)
    637.     UPDATE_CACHE(re, s)
             ^
    638.     tmp= SHOW_UBITS(re, s, n);
    639.     LAST_SKIP_BITS(re, s, n)

libavcodec/bitstream.h:638:5: 
    636.     OPEN_READER(re, s)
    637.     UPDATE_CACHE(re, s)
    638.     tmp= SHOW_UBITS(re, s, n);
             ^
    639.     LAST_SKIP_BITS(re, s, n)
    640.     CLOSE_READER(re, s)

libavcodec/bitstream.h:639:5: 
    637.     UPDATE_CACHE(re, s)
    638.     tmp= SHOW_UBITS(re, s, n);
    639.     LAST_SKIP_BITS(re, s, n)
             ^
    640.     CLOSE_READER(re, s)
    641.     return tmp;

libavcodec/bitstream.h:640:5: 
    638.     tmp= SHOW_UBITS(re, s, n);
    639.     LAST_SKIP_BITS(re, s, n)
    640.     CLOSE_READER(re, s)
             ^
    641.     return tmp;
    642. }

libavcodec/bitstream.h:641:5: 
    639.     LAST_SKIP_BITS(re, s, n)
    640.     CLOSE_READER(re, s)
    641.     return tmp;
             ^
    642. }
    643. 

libavcodec/bitstream.h:642:1: return from a call to get_bits
    640.     CLOSE_READER(re, s)
    641.     return tmp;
    642. }
         ^
    643. 
    644. /**

libavcodec/qdm2.c:418:9: Taking false branch
  416.     sub_packet->type = get_bits (gb, 8);
  417. 
  418.     if (sub_packet->type == 0) {
               ^
  419.         sub_packet->size = 0;
  420.         sub_packet->data = NULL;

libavcodec/qdm2.c:422:9: 
  420.         sub_packet->data = NULL;
  421.     } else {
  422.         sub_packet->size = get_bits (gb, 8);
               ^
  423. 
  424.       if (sub_packet->type & 0x80) {

libavcodec/bitstream.h:634:1: start of procedure get_bits()
    632.  * Note, the alt bitstream reader can read up to 25 bits, but the libmpeg2 reader can't
    633.  */
    634. static inline unsigned int get_bits(GetBitContext *s, int n){
         ^
    635.     register int tmp;
    636.     OPEN_READER(re, s)

libavcodec/bitstream.h:636:5: 
    634. static inline unsigned int get_bits(GetBitContext *s, int n){
    635.     register int tmp;
    636.     OPEN_READER(re, s)
             ^
    637.     UPDATE_CACHE(re, s)
    638.     tmp= SHOW_UBITS(re, s, n);

libavcodec/bitstream.h:637:5: 
    635.     register int tmp;
    636.     OPEN_READER(re, s)
    637.     UPDATE_CACHE(re, s)
             ^
    638.     tmp= SHOW_UBITS(re, s, n);
    639.     LAST_SKIP_BITS(re, s, n)

libavcodec/bitstream.h:638:5: 
    636.     OPEN_READER(re, s)
    637.     UPDATE_CACHE(re, s)
    638.     tmp= SHOW_UBITS(re, s, n);
             ^
    639.     LAST_SKIP_BITS(re, s, n)
    640.     CLOSE_READER(re, s)

libavcodec/bitstream.h:639:5: 
    637.     UPDATE_CACHE(re, s)
    638.     tmp= SHOW_UBITS(re, s, n);
    639.     LAST_SKIP_BITS(re, s, n)
             ^
    640.     CLOSE_READER(re, s)
    641.     return tmp;

libavcodec/bitstream.h:640:5: 
    638.     tmp= SHOW_UBITS(re, s, n);
    639.     LAST_SKIP_BITS(re, s, n)
    640.     CLOSE_READER(re, s)
             ^
    641.     return tmp;
    642. }

libavcodec/bitstream.h:641:5: 
    639.     LAST_SKIP_BITS(re, s, n)
    640.     CLOSE_READER(re, s)
    641.     return tmp;
             ^
    642. }
    643. 

libavcodec/bitstream.h:642:1: return from a call to get_bits
    640.     CLOSE_READER(re, s)
    641.     return tmp;
    642. }
         ^
    643. 
    644. /**

libavcodec/qdm2.c:424:11: Taking true branch
  422.         sub_packet->size = get_bits (gb, 8);
  423. 
  424.       if (sub_packet->type & 0x80) {
                 ^
  425.           sub_packet->size <<= 8;
  426.           sub_packet->size  |= get_bits (gb, 8);

libavcodec/qdm2.c:425:11: 
  423. 
  424.       if (sub_packet->type & 0x80) {
  425.           sub_packet->size <<= 8;
                 ^
  426.           sub_packet->size  |= get_bits (gb, 8);
  427.           sub_packet->type  &= 0x7f;

libavcodec/qdm2.c:426:11: 
  424.       if (sub_packet->type & 0x80) {
  425.           sub_packet->size <<= 8;
  426.           sub_packet->size  |= get_bits (gb, 8);
                 ^
  427.           sub_packet->type  &= 0x7f;
  428.       }

libavcodec/bitstream.h:634:1: start of procedure get_bits()
    632.  * Note, the alt bitstream reader can read up to 25 bits, but the libmpeg2 reader can't
    633.  */
    634. static inline unsigned int get_bits(GetBitContext *s, int n){
         ^
    635.     register int tmp;
    636.     OPEN_READER(re, s)

libavcodec/bitstream.h:636:5: 
    634. static inline unsigned int get_bits(GetBitContext *s, int n){
    635.     register int tmp;
    636.     OPEN_READER(re, s)
             ^
    637.     UPDATE_CACHE(re, s)
    638.     tmp= SHOW_UBITS(re, s, n);

libavcodec/bitstream.h:637:5: 
    635.     register int tmp;
    636.     OPEN_READER(re, s)
    637.     UPDATE_CACHE(re, s)
             ^
    638.     tmp= SHOW_UBITS(re, s, n);
    639.     LAST_SKIP_BITS(re, s, n)

libavcodec/bitstream.h:638:5: 
    636.     OPEN_READER(re, s)
    637.     UPDATE_CACHE(re, s)
    638.     tmp= SHOW_UBITS(re, s, n);
             ^
    639.     LAST_SKIP_BITS(re, s, n)
    640.     CLOSE_READER(re, s)

libavcodec/bitstream.h:639:5: 
    637.     UPDATE_CACHE(re, s)
    638.     tmp= SHOW_UBITS(re, s, n);
    639.     LAST_SKIP_BITS(re, s, n)
             ^
    640.     CLOSE_READER(re, s)
    641.     return tmp;

libavcodec/bitstream.h:640:5: 
    638.     tmp= SHOW_UBITS(re, s, n);
    639.     LAST_SKIP_BITS(re, s, n)
    640.     CLOSE_READER(re, s)
             ^
    641.     return tmp;
    642. }

libavcodec/bitstream.h:641:5: 
    639.     LAST_SKIP_BITS(re, s, n)
    640.     CLOSE_READER(re, s)
    641.     return tmp;
             ^
    642. }
    643. 

libavcodec/bitstream.h:642:1: return from a call to get_bits
    640.     CLOSE_READER(re, s)
    641.     return tmp;
    642. }
         ^
    643. 
    644. /**

libavcodec/qdm2.c:427:11: 
  425.           sub_packet->size <<= 8;
  426.           sub_packet->size  |= get_bits (gb, 8);
  427.           sub_packet->type  &= 0x7f;
                 ^
  428.       }
  429. 

libavcodec/qdm2.c:430:11: Taking true branch
  428.       }
  429. 
  430.       if (sub_packet->type == 0x7f)
                 ^
  431.           sub_packet->type |= (get_bits (gb, 8) << 8);
  432. 

libavcodec/qdm2.c:431:11: 
  429. 
  430.       if (sub_packet->type == 0x7f)
  431.           sub_packet->type |= (get_bits (gb, 8) << 8);
                 ^
  432. 
  433.       sub_packet->data = &gb->buffer[get_bits_count(gb) / 8]; // FIXME: this depends on bitreader internal data

libavcodec/bitstream.h:634:1: start of procedure get_bits()
    632.  * Note, the alt bitstream reader can read up to 25 bits, but the libmpeg2 reader can't
    633.  */
    634. static inline unsigned int get_bits(GetBitContext *s, int n){
         ^
    635.     register int tmp;
    636.     OPEN_READER(re, s)

libavcodec/bitstream.h:636:5: 
    634. static inline unsigned int get_bits(GetBitContext *s, int n){
    635.     register int tmp;
    636.     OPEN_READER(re, s)
             ^
    637.     UPDATE_CACHE(re, s)
    638.     tmp= SHOW_UBITS(re, s, n);

libavcodec/bitstream.h:637:5: 
    635.     register int tmp;
    636.     OPEN_READER(re, s)
    637.     UPDATE_CACHE(re, s)
             ^
    638.     tmp= SHOW_UBITS(re, s, n);
    639.     LAST_SKIP_BITS(re, s, n)

libavcodec/bitstream.h:638:5: 
    636.     OPEN_READER(re, s)
    637.     UPDATE_CACHE(re, s)
    638.     tmp= SHOW_UBITS(re, s, n);
             ^
    639.     LAST_SKIP_BITS(re, s, n)
    640.     CLOSE_READER(re, s)

libavcodec/bitstream.h:639:5: 
    637.     UPDATE_CACHE(re, s)
    638.     tmp= SHOW_UBITS(re, s, n);
    639.     LAST_SKIP_BITS(re, s, n)
             ^
    640.     CLOSE_READER(re, s)
    641.     return tmp;

libavcodec/bitstream.h:640:5: 
    638.     tmp= SHOW_UBITS(re, s, n);
    639.     LAST_SKIP_BITS(re, s, n)
    640.     CLOSE_READER(re, s)
             ^
    641.     return tmp;
    642. }

libavcodec/bitstream.h:641:5: 
    639.     LAST_SKIP_BITS(re, s, n)
    640.     CLOSE_READER(re, s)
    641.     return tmp;
             ^
    642. }
    643. 

libavcodec/bitstream.h:642:1: return from a call to get_bits
    640.     CLOSE_READER(re, s)
    641.     return tmp;
    642. }
         ^
    643. 
    644. /**

libavcodec/qdm2.c:433:7: 
  431.           sub_packet->type |= (get_bits (gb, 8) << 8);
  432. 
  433.       sub_packet->data = &gb->buffer[get_bits_count(gb) / 8]; // FIXME: this depends on bitreader internal data
             ^
  434.     }
  435. 

libavcodec/bitstream.h:456:1: start of procedure get_bits_count()
    454.         ((uint32_t)name##_cache)
    455. 
    456. static inline int get_bits_count(GetBitContext *s){
         ^
    457.     return s->index;
    458. }

libavcodec/bitstream.h:457:5: 
    455. 
    456. static inline int get_bits_count(GetBitContext *s){
    457.     return s->index;
             ^
    458. }
    459. 

libavcodec/bitstream.h:458:1: return from a call to get_bits_count
    456. static inline int get_bits_count(GetBitContext *s){
    457.     return s->index;
    458. }
         ^
    459. 
    460. static inline void skip_bits_long(GetBitContext *s, int n){

libavcodec/qdm2.c:436:5: 
  434.     }
  435. 
  436.     av_log(NULL,AV_LOG_DEBUG,"Subpacket: type=%d size=%d start_offs=%x\n",
           ^
  437.         sub_packet->type, sub_packet->size, get_bits_count(gb) / 8);
  438. }

libavcodec/bitstream.h:456:1: start of procedure get_bits_count()
    454.         ((uint32_t)name##_cache)
    455. 
    456. static inline int get_bits_count(GetBitContext *s){
         ^
    457.     return s->index;
    458. }

libavcodec/bitstream.h:457:5: 
    455. 
    456. static inline int get_bits_count(GetBitContext *s){
    457.     return s->index;
             ^
    458. }
    459. 

libavcodec/bitstream.h:458:1: return from a call to get_bits_count
    456. static inline int get_bits_count(GetBitContext *s){
    457.     return s->index;
    458. }
         ^
    459. 
    460. static inline void skip_bits_long(GetBitContext *s, int n){

libavcodec/qdm2.c:436:5: Skipping av_log(): empty list of specs
  434.     }
  435. 
  436.     av_log(NULL,AV_LOG_DEBUG,"Subpacket: type=%d size=%d start_offs=%x\n",
           ^
  437.         sub_packet->type, sub_packet->size, get_bits_count(gb) / 8);
  438. }

libavcodec/qdm2.c:438:1: return from a call to qdm2_decode_sub_packet_header
  436.     av_log(NULL,AV_LOG_DEBUG,"Subpacket: type=%d size=%d start_offs=%x\n",
  437.         sub_packet->type, sub_packet->size, get_bits_count(gb) / 8);
  438. }
       ^
  439. 
  440. 

libavcodec/qdm2.c:1223:9: Taking false branch
1221.     qdm2_decode_sub_packet_header(&gb, &header);
1222. 
1223.     if (header.type < 2 || header.type >= 8) {
              ^
1224.         q->has_errors = 1;
1225.         av_log(NULL,AV_LOG_ERROR,"bad superblock type\n");

libavcodec/qdm2.c:1223:28: Taking false branch
1221.     qdm2_decode_sub_packet_header(&gb, &header);
1222. 
1223.     if (header.type < 2 || header.type >= 8) {
                                 ^
1224.         q->has_errors = 1;
1225.         av_log(NULL,AV_LOG_ERROR,"bad superblock type\n");

libavcodec/qdm2.c:1229:30: Condition is false
1227.     }
1228. 
1229.     q->superblocktype_2_3 = (header.type == 2 || header.type == 3);
                                   ^
1230.     packet_bytes = (q->compressed_size - get_bits_count(&gb) / 8);
1231. 

libavcodec/qdm2.c:1229:50: Condition is false
1227.     }
1228. 
1229.     q->superblocktype_2_3 = (header.type == 2 || header.type == 3);
                                                       ^
1230.     packet_bytes = (q->compressed_size - get_bits_count(&gb) / 8);
1231. 

libavcodec/qdm2.c:1229:30: 
1227.     }
1228. 
1229.     q->superblocktype_2_3 = (header.type == 2 || header.type == 3);
                                   ^
1230.     packet_bytes = (q->compressed_size - get_bits_count(&gb) / 8);
1231. 

libavcodec/qdm2.c:1229:5: 
1227.     }
1228. 
1229.     q->superblocktype_2_3 = (header.type == 2 || header.type == 3);
          ^
1230.     packet_bytes = (q->compressed_size - get_bits_count(&gb) / 8);
1231. 

libavcodec/qdm2.c:1230:5: 
1228. 
1229.     q->superblocktype_2_3 = (header.type == 2 || header.type == 3);
1230.     packet_bytes = (q->compressed_size - get_bits_count(&gb) / 8);
          ^
1231. 
1232.     init_get_bits(&gb, header.data, header.size*8);

libavcodec/bitstream.h:456:1: start of procedure get_bits_count()
  454.         ((uint32_t)name##_cache)
  455. 
  456. static inline int get_bits_count(GetBitContext *s){
       ^
  457.     return s->index;
  458. }

libavcodec/bitstream.h:457:5: 
  455. 
  456. static inline int get_bits_count(GetBitContext *s){
  457.     return s->index;
           ^
  458. }
  459. 

libavcodec/bitstream.h:458:1: return from a call to get_bits_count
  456. static inline int get_bits_count(GetBitContext *s){
  457.     return s->index;
  458. }
       ^
  459. 
  460. static inline void skip_bits_long(GetBitContext *s, int n){

libavcodec/qdm2.c:1232:5: 
1230.     packet_bytes = (q->compressed_size - get_bits_count(&gb) / 8);
1231. 
1232.     init_get_bits(&gb, header.data, header.size*8);
          ^
1233. 
1234.     if (header.type == 2 || header.type == 4 || header.type == 5) {

libavcodec/bitstream.h:737:1: start of procedure init_get_bits()
  735.  * @param bit_size the size of the buffer in bits
  736.  */
  737. static inline void init_get_bits(GetBitContext *s,
       ^
  738.                    const uint8_t *buffer, int bit_size)
  739. {

libavcodec/bitstream.h:740:5: 
  738.                    const uint8_t *buffer, int bit_size)
  739. {
  740.     int buffer_size= (bit_size+7)>>3;
           ^
  741.     if(buffer_size < 0 || bit_size < 0) {
  742.         buffer_size = bit_size = 0;

libavcodec/bitstream.h:741:8: Taking true branch
  739. {
  740.     int buffer_size= (bit_size+7)>>3;
  741.     if(buffer_size < 0 || bit_size < 0) {
              ^
  742.         buffer_size = bit_size = 0;
  743.         buffer = NULL;

libavcodec/bitstream.h:742:9: 
  740.     int buffer_size= (bit_size+7)>>3;
  741.     if(buffer_size < 0 || bit_size < 0) {
  742.         buffer_size = bit_size = 0;
               ^
  743.         buffer = NULL;
  744.     }

libavcodec/bitstream.h:743:9: 
  741.     if(buffer_size < 0 || bit_size < 0) {
  742.         buffer_size = bit_size = 0;
  743.         buffer = NULL;
               ^
  744.     }
  745. 

libavcodec/bitstream.h:746:5: 
  744.     }
  745. 
  746.     s->buffer= buffer;
           ^
  747.     s->size_in_bits= bit_size;
  748.     s->buffer_end= buffer + buffer_size;

libavcodec/bitstream.h:747:5: 
  745. 
  746.     s->buffer= buffer;
  747.     s->size_in_bits= bit_size;
           ^
  748.     s->buffer_end= buffer + buffer_size;
  749. #ifdef ALT_BITSTREAM_READER

libavcodec/bitstream.h:748:5: 
  746.     s->buffer= buffer;
  747.     s->size_in_bits= bit_size;
  748.     s->buffer_end= buffer + buffer_size;
           ^
  749. #ifdef ALT_BITSTREAM_READER
  750.     s->index=0;

libavcodec/bitstream.h:750:5: 
  748.     s->buffer_end= buffer + buffer_size;
  749. #ifdef ALT_BITSTREAM_READER
  750.     s->index=0;
           ^
  751. #elif defined LIBMPEG2_BITSTREAM_READER
  752.     s->buffer_ptr = (uint8_t*)((intptr_t)buffer&(~1));

libavcodec/bitstream.h:760:1: return from a call to init_get_bits
  758.     skip_bits_long(s, 0);
  759. #endif
  760. }
       ^
  761. 
  762. static inline void align_get_bits(GetBitContext *s)

libavcodec/qdm2.c:1234:9: Taking false branch
1232.     init_get_bits(&gb, header.data, header.size*8);
1233. 
1234.     if (header.type == 2 || header.type == 4 || header.type == 5) {
              ^
1235.         int csum = 257 * get_bits(&gb, 8) + 2 * get_bits(&gb, 8);
1236. 

libavcodec/qdm2.c:1234:29: Taking false branch
1232.     init_get_bits(&gb, header.data, header.size*8);
1233. 
1234.     if (header.type == 2 || header.type == 4 || header.type == 5) {
                                  ^
1235.         int csum = 257 * get_bits(&gb, 8) + 2 * get_bits(&gb, 8);
1236. 

libavcodec/qdm2.c:1234:49: Taking true branch
1232.     init_get_bits(&gb, header.data, header.size*8);
1233. 
1234.     if (header.type == 2 || header.type == 4 || header.type == 5) {
                                                      ^
1235.         int csum = 257 * get_bits(&gb, 8) + 2 * get_bits(&gb, 8);
1236. 

libavcodec/qdm2.c:1235:9: 
1233. 
1234.     if (header.type == 2 || header.type == 4 || header.type == 5) {
1235.         int csum = 257 * get_bits(&gb, 8) + 2 * get_bits(&gb, 8);
              ^
1236. 
1237.         csum = qdm2_packet_checksum(q->compressed_data, q->checksum_size, csum);

libavcodec/bitstream.h:634:1: start of procedure get_bits()
  632.  * Note, the alt bitstream reader can read up to 25 bits, but the libmpeg2 reader can't
  633.  */
  634. static inline unsigned int get_bits(GetBitContext *s, int n){
       ^
  635.     register int tmp;
  636.     OPEN_READER(re, s)

libavcodec/bitstream.h:636:5: 
  634. static inline unsigned int get_bits(GetBitContext *s, int n){
  635.     register int tmp;
  636.     OPEN_READER(re, s)
           ^
  637.     UPDATE_CACHE(re, s)
  638.     tmp= SHOW_UBITS(re, s, n);

libavcodec/bitstream.h:637:5: 
  635.     register int tmp;
  636.     OPEN_READER(re, s)
  637.     UPDATE_CACHE(re, s)
           ^
  638.     tmp= SHOW_UBITS(re, s, n);
  639.     LAST_SKIP_BITS(re, s, n)
