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

libavcodec/qdm2.c:1213:1: start of procedure qdm2_decode_super_block()
1211.  * @param q    context
1212.  */
1213. static void qdm2_decode_super_block (QDM2Context *q)
      ^
1214. {
1215.     GetBitContext gb;

libavcodec/qdm2.c:1218:5: 
1216.     QDM2SubPacket header, *packet;
1217.     int i, packet_bytes, sub_packet_size, sub_packets_D;
1218.     unsigned int next_index = 0;
          ^
1219. 
1220.     memset(q->tone_level_idx_hi1, 0, sizeof(q->tone_level_idx_hi1));

libavcodec/qdm2.c:1220:5: 
1218.     unsigned int next_index = 0;
1219. 
1220.     memset(q->tone_level_idx_hi1, 0, sizeof(q->tone_level_idx_hi1));
          ^
1221.     memset(q->tone_level_idx_mid, 0, sizeof(q->tone_level_idx_mid));
1222.     memset(q->tone_level_idx_hi2, 0, sizeof(q->tone_level_idx_hi2));

libavcodec/qdm2.c:1221:5: 
1219. 
1220.     memset(q->tone_level_idx_hi1, 0, sizeof(q->tone_level_idx_hi1));
1221.     memset(q->tone_level_idx_mid, 0, sizeof(q->tone_level_idx_mid));
          ^
1222.     memset(q->tone_level_idx_hi2, 0, sizeof(q->tone_level_idx_hi2));
1223. 

libavcodec/qdm2.c:1222:5: 
1220.     memset(q->tone_level_idx_hi1, 0, sizeof(q->tone_level_idx_hi1));
1221.     memset(q->tone_level_idx_mid, 0, sizeof(q->tone_level_idx_mid));
1222.     memset(q->tone_level_idx_hi2, 0, sizeof(q->tone_level_idx_hi2));
          ^
1223. 
1224.     q->sub_packets_B = 0;

libavcodec/qdm2.c:1224:5: 
1222.     memset(q->tone_level_idx_hi2, 0, sizeof(q->tone_level_idx_hi2));
1223. 
1224.     q->sub_packets_B = 0;
          ^
1225.     sub_packets_D = 0;
1226. 

libavcodec/qdm2.c:1225:5: 
1223. 
1224.     q->sub_packets_B = 0;
1225.     sub_packets_D = 0;
          ^
1226. 
1227.     average_quantized_coeffs(q); // average elements in quantized_coeffs[max_ch][10][8]

libavcodec/qdm2.c:1227:5: Skipping average_quantized_coeffs(): empty list of specs
1225.     sub_packets_D = 0;
1226. 
1227.     average_quantized_coeffs(q); // average elements in quantized_coeffs[max_ch][10][8]
          ^
1228. 
1229.     init_get_bits(&gb, q->compressed_data, q->compressed_size*8);

libavcodec/qdm2.c:1229:5: 
1227.     average_quantized_coeffs(q); // average elements in quantized_coeffs[max_ch][10][8]
1228. 
1229.     init_get_bits(&gb, q->compressed_data, q->compressed_size*8);
          ^
1230.     qdm2_decode_sub_packet_header(&gb, &header);
1231. 

libavcodec/bitstream.h:758:1: start of procedure init_get_bits()
  756.  * @param bit_size the size of the buffer in bits
  757.  */
  758. static inline void init_get_bits(GetBitContext *s,
       ^
  759.                    const uint8_t *buffer, int bit_size)
  760. {

libavcodec/bitstream.h:761:5: 
  759.                    const uint8_t *buffer, int bit_size)
  760. {
  761.     int buffer_size= (bit_size+7)>>3;
           ^
  762.     if(buffer_size < 0 || bit_size < 0) {
  763.         buffer_size = bit_size = 0;

libavcodec/bitstream.h:762:8: Taking false branch
  760. {
  761.     int buffer_size= (bit_size+7)>>3;
  762.     if(buffer_size < 0 || bit_size < 0) {
              ^
  763.         buffer_size = bit_size = 0;
  764.         buffer = NULL;

libavcodec/bitstream.h:762:27: Taking false branch
  760. {
  761.     int buffer_size= (bit_size+7)>>3;
  762.     if(buffer_size < 0 || bit_size < 0) {
                                 ^
  763.         buffer_size = bit_size = 0;
  764.         buffer = NULL;

libavcodec/bitstream.h:767:5: 
  765.     }
  766. 
  767.     s->buffer= buffer;
           ^
  768.     s->size_in_bits= bit_size;
  769.     s->buffer_end= buffer + buffer_size;

libavcodec/bitstream.h:768:5: 
  766. 
  767.     s->buffer= buffer;
  768.     s->size_in_bits= bit_size;
           ^
  769.     s->buffer_end= buffer + buffer_size;
  770. #ifdef ALT_BITSTREAM_READER

libavcodec/bitstream.h:769:5: 
  767.     s->buffer= buffer;
  768.     s->size_in_bits= bit_size;
  769.     s->buffer_end= buffer + buffer_size;
           ^
  770. #ifdef ALT_BITSTREAM_READER
  771.     s->index=0;

libavcodec/bitstream.h:771:5: 
  769.     s->buffer_end= buffer + buffer_size;
  770. #ifdef ALT_BITSTREAM_READER
  771.     s->index=0;
           ^
  772. #elif defined LIBMPEG2_BITSTREAM_READER
  773.     s->buffer_ptr = (uint8_t*)((intptr_t)buffer&(~1));

libavcodec/bitstream.h:781:1: return from a call to init_get_bits
  779.     skip_bits_long(s, 0);
  780. #endif
  781. }
       ^
  782. 
  783. static inline void align_get_bits(GetBitContext *s)

libavcodec/qdm2.c:1230:5: 
1228. 
1229.     init_get_bits(&gb, q->compressed_data, q->compressed_size*8);
1230.     qdm2_decode_sub_packet_header(&gb, &header);
          ^
1231. 
1232.     if (header.type < 2 || header.type >= 8) {

libavcodec/qdm2.c:423:1: start of procedure qdm2_decode_sub_packet_header()
  421.  * @param sub_packet    packet under analysis
  422.  */
  423. static void qdm2_decode_sub_packet_header (GetBitContext *gb, QDM2SubPacket *sub_packet)
       ^
  424. {
  425.     sub_packet->type = get_bits (gb, 8);

libavcodec/qdm2.c:425:5: 
  423. static void qdm2_decode_sub_packet_header (GetBitContext *gb, QDM2SubPacket *sub_packet)
  424. {
  425.     sub_packet->type = get_bits (gb, 8);
           ^
  426. 
  427.     if (sub_packet->type == 0) {

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

libavcodec/bitstream.h:657:5: 
    655. static inline unsigned int get_bits(GetBitContext *s, int n){
    656.     register int tmp;
    657.     OPEN_READER(re, s)
             ^
    658.     UPDATE_CACHE(re, s)
    659.     tmp= SHOW_UBITS(re, s, n);

libavcodec/bitstream.h:658:5: 
    656.     register int tmp;
    657.     OPEN_READER(re, s)
    658.     UPDATE_CACHE(re, s)
             ^
    659.     tmp= SHOW_UBITS(re, s, n);
    660.     LAST_SKIP_BITS(re, s, n)

libavcodec/bitstream.h:659:5: 
    657.     OPEN_READER(re, s)
    658.     UPDATE_CACHE(re, s)
    659.     tmp= SHOW_UBITS(re, s, n);
             ^
    660.     LAST_SKIP_BITS(re, s, n)
    661.     CLOSE_READER(re, s)

libavcodec/bitstream.h:660:5: 
    658.     UPDATE_CACHE(re, s)
    659.     tmp= SHOW_UBITS(re, s, n);
    660.     LAST_SKIP_BITS(re, s, n)
             ^
    661.     CLOSE_READER(re, s)
    662.     return tmp;

libavcodec/bitstream.h:661:5: 
    659.     tmp= SHOW_UBITS(re, s, n);
    660.     LAST_SKIP_BITS(re, s, n)
    661.     CLOSE_READER(re, s)
             ^
    662.     return tmp;
    663. }

libavcodec/bitstream.h:662:5: 
    660.     LAST_SKIP_BITS(re, s, n)
    661.     CLOSE_READER(re, s)
    662.     return tmp;
             ^
    663. }
    664. 

libavcodec/bitstream.h:663:1: return from a call to get_bits
    661.     CLOSE_READER(re, s)
    662.     return tmp;
    663. }
         ^
    664. 
    665. /**

libavcodec/qdm2.c:427:9: Taking false branch
  425.     sub_packet->type = get_bits (gb, 8);
  426. 
  427.     if (sub_packet->type == 0) {
               ^
  428.         sub_packet->size = 0;
  429.         sub_packet->data = NULL;

libavcodec/qdm2.c:431:9: 
  429.         sub_packet->data = NULL;
  430.     } else {
  431.         sub_packet->size = get_bits (gb, 8);
               ^
  432. 
  433.       if (sub_packet->type & 0x80) {

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

libavcodec/bitstream.h:657:5: 
    655. static inline unsigned int get_bits(GetBitContext *s, int n){
    656.     register int tmp;
    657.     OPEN_READER(re, s)
             ^
    658.     UPDATE_CACHE(re, s)
    659.     tmp= SHOW_UBITS(re, s, n);

libavcodec/bitstream.h:658:5: 
    656.     register int tmp;
    657.     OPEN_READER(re, s)
    658.     UPDATE_CACHE(re, s)
             ^
    659.     tmp= SHOW_UBITS(re, s, n);
    660.     LAST_SKIP_BITS(re, s, n)

libavcodec/bitstream.h:659:5: 
    657.     OPEN_READER(re, s)
    658.     UPDATE_CACHE(re, s)
    659.     tmp= SHOW_UBITS(re, s, n);
             ^
    660.     LAST_SKIP_BITS(re, s, n)
    661.     CLOSE_READER(re, s)

libavcodec/bitstream.h:660:5: 
    658.     UPDATE_CACHE(re, s)
    659.     tmp= SHOW_UBITS(re, s, n);
    660.     LAST_SKIP_BITS(re, s, n)
             ^
    661.     CLOSE_READER(re, s)
    662.     return tmp;

libavcodec/bitstream.h:661:5: 
    659.     tmp= SHOW_UBITS(re, s, n);
    660.     LAST_SKIP_BITS(re, s, n)
    661.     CLOSE_READER(re, s)
             ^
    662.     return tmp;
    663. }

libavcodec/bitstream.h:662:5: 
    660.     LAST_SKIP_BITS(re, s, n)
    661.     CLOSE_READER(re, s)
    662.     return tmp;
             ^
    663. }
    664. 

libavcodec/bitstream.h:663:1: return from a call to get_bits
    661.     CLOSE_READER(re, s)
    662.     return tmp;
    663. }
         ^
    664. 
    665. /**

libavcodec/qdm2.c:433:11: Taking true branch
  431.         sub_packet->size = get_bits (gb, 8);
  432. 
  433.       if (sub_packet->type & 0x80) {
                 ^
  434.           sub_packet->size <<= 8;
  435.           sub_packet->size  |= get_bits (gb, 8);

libavcodec/qdm2.c:434:11: 
  432. 
  433.       if (sub_packet->type & 0x80) {
  434.           sub_packet->size <<= 8;
                 ^
  435.           sub_packet->size  |= get_bits (gb, 8);
  436.           sub_packet->type  &= 0x7f;

libavcodec/qdm2.c:435:11: 
  433.       if (sub_packet->type & 0x80) {
  434.           sub_packet->size <<= 8;
  435.           sub_packet->size  |= get_bits (gb, 8);
                 ^
  436.           sub_packet->type  &= 0x7f;
  437.       }

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

libavcodec/bitstream.h:657:5: 
    655. static inline unsigned int get_bits(GetBitContext *s, int n){
    656.     register int tmp;
    657.     OPEN_READER(re, s)
             ^
    658.     UPDATE_CACHE(re, s)
    659.     tmp= SHOW_UBITS(re, s, n);

libavcodec/bitstream.h:658:5: 
    656.     register int tmp;
    657.     OPEN_READER(re, s)
    658.     UPDATE_CACHE(re, s)
             ^
    659.     tmp= SHOW_UBITS(re, s, n);
    660.     LAST_SKIP_BITS(re, s, n)

libavcodec/bitstream.h:659:5: 
    657.     OPEN_READER(re, s)
    658.     UPDATE_CACHE(re, s)
    659.     tmp= SHOW_UBITS(re, s, n);
             ^
    660.     LAST_SKIP_BITS(re, s, n)
    661.     CLOSE_READER(re, s)

libavcodec/bitstream.h:660:5: 
    658.     UPDATE_CACHE(re, s)
    659.     tmp= SHOW_UBITS(re, s, n);
    660.     LAST_SKIP_BITS(re, s, n)
             ^
    661.     CLOSE_READER(re, s)
    662.     return tmp;

libavcodec/bitstream.h:661:5: 
    659.     tmp= SHOW_UBITS(re, s, n);
    660.     LAST_SKIP_BITS(re, s, n)
    661.     CLOSE_READER(re, s)
             ^
    662.     return tmp;
    663. }

libavcodec/bitstream.h:662:5: 
    660.     LAST_SKIP_BITS(re, s, n)
    661.     CLOSE_READER(re, s)
    662.     return tmp;
             ^
    663. }
    664. 

libavcodec/bitstream.h:663:1: return from a call to get_bits
    661.     CLOSE_READER(re, s)
    662.     return tmp;
    663. }
         ^
    664. 
    665. /**

libavcodec/qdm2.c:436:11: 
  434.           sub_packet->size <<= 8;
  435.           sub_packet->size  |= get_bits (gb, 8);
  436.           sub_packet->type  &= 0x7f;
                 ^
  437.       }
  438. 

libavcodec/qdm2.c:439:11: Taking true branch
  437.       }
  438. 
  439.       if (sub_packet->type == 0x7f)
                 ^
  440.           sub_packet->type |= (get_bits (gb, 8) << 8);
  441. 

libavcodec/qdm2.c:440:11: 
  438. 
  439.       if (sub_packet->type == 0x7f)
  440.           sub_packet->type |= (get_bits (gb, 8) << 8);
                 ^
  441. 
  442.       sub_packet->data = &gb->buffer[get_bits_count(gb) / 8]; // FIXME: this depends on bitreader internal data

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

libavcodec/bitstream.h:657:5: 
    655. static inline unsigned int get_bits(GetBitContext *s, int n){
    656.     register int tmp;
    657.     OPEN_READER(re, s)
             ^
    658.     UPDATE_CACHE(re, s)
    659.     tmp= SHOW_UBITS(re, s, n);

libavcodec/bitstream.h:658:5: 
    656.     register int tmp;
    657.     OPEN_READER(re, s)
    658.     UPDATE_CACHE(re, s)
             ^
    659.     tmp= SHOW_UBITS(re, s, n);
    660.     LAST_SKIP_BITS(re, s, n)

libavcodec/bitstream.h:659:5: 
    657.     OPEN_READER(re, s)
    658.     UPDATE_CACHE(re, s)
    659.     tmp= SHOW_UBITS(re, s, n);
             ^
    660.     LAST_SKIP_BITS(re, s, n)
    661.     CLOSE_READER(re, s)

libavcodec/bitstream.h:660:5: 
    658.     UPDATE_CACHE(re, s)
    659.     tmp= SHOW_UBITS(re, s, n);
    660.     LAST_SKIP_BITS(re, s, n)
             ^
    661.     CLOSE_READER(re, s)
    662.     return tmp;

libavcodec/bitstream.h:661:5: 
    659.     tmp= SHOW_UBITS(re, s, n);
    660.     LAST_SKIP_BITS(re, s, n)
    661.     CLOSE_READER(re, s)
             ^
    662.     return tmp;
    663. }

libavcodec/bitstream.h:662:5: 
    660.     LAST_SKIP_BITS(re, s, n)
    661.     CLOSE_READER(re, s)
    662.     return tmp;
             ^
    663. }
    664. 

libavcodec/bitstream.h:663:1: return from a call to get_bits
    661.     CLOSE_READER(re, s)
    662.     return tmp;
    663. }
         ^
    664. 
    665. /**

libavcodec/qdm2.c:442:7: 
  440.           sub_packet->type |= (get_bits (gb, 8) << 8);
  441. 
  442.       sub_packet->data = &gb->buffer[get_bits_count(gb) / 8]; // FIXME: this depends on bitreader internal data
             ^
  443.     }
  444. 

libavcodec/bitstream.h:464:1: start of procedure get_bits_count()
    462.         ((uint32_t)name##_cache)
    463. 
    464. static inline int get_bits_count(GetBitContext *s){
         ^
    465.     return s->index;
    466. }

libavcodec/bitstream.h:465:5: 
    463. 
    464. static inline int get_bits_count(GetBitContext *s){
    465.     return s->index;
             ^
    466. }
    467. 

libavcodec/bitstream.h:466:1: return from a call to get_bits_count
    464. static inline int get_bits_count(GetBitContext *s){
    465.     return s->index;
    466. }
         ^
    467. 
    468. static inline void skip_bits_long(GetBitContext *s, int n){

libavcodec/qdm2.c:445:5: 
  443.     }
  444. 
  445.     av_log(NULL,AV_LOG_DEBUG,"Subpacket: type=%d size=%d start_offs=%x\n",
           ^
  446.         sub_packet->type, sub_packet->size, get_bits_count(gb) / 8);
  447. }

libavcodec/bitstream.h:464:1: start of procedure get_bits_count()
    462.         ((uint32_t)name##_cache)
    463. 
    464. static inline int get_bits_count(GetBitContext *s){
         ^
    465.     return s->index;
    466. }

libavcodec/bitstream.h:465:5: 
    463. 
    464. static inline int get_bits_count(GetBitContext *s){
    465.     return s->index;
             ^
    466. }
    467. 

libavcodec/bitstream.h:466:1: return from a call to get_bits_count
    464. static inline int get_bits_count(GetBitContext *s){
    465.     return s->index;
    466. }
         ^
    467. 
    468. static inline void skip_bits_long(GetBitContext *s, int n){

libavcodec/qdm2.c:445:5: Skipping av_log(): empty list of specs
  443.     }
  444. 
  445.     av_log(NULL,AV_LOG_DEBUG,"Subpacket: type=%d size=%d start_offs=%x\n",
           ^
  446.         sub_packet->type, sub_packet->size, get_bits_count(gb) / 8);
  447. }

libavcodec/qdm2.c:447:1: return from a call to qdm2_decode_sub_packet_header
  445.     av_log(NULL,AV_LOG_DEBUG,"Subpacket: type=%d size=%d start_offs=%x\n",
  446.         sub_packet->type, sub_packet->size, get_bits_count(gb) / 8);
  447. }
       ^
  448. 
  449. 

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

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

libavcodec/qdm2.c:1238:30: Condition is false
1236.     }
1237. 
1238.     q->superblocktype_2_3 = (header.type == 2 || header.type == 3);
                                   ^
1239.     packet_bytes = (q->compressed_size - get_bits_count(&gb) / 8);
1240. 

libavcodec/qdm2.c:1238:50: Condition is false
1236.     }
1237. 
1238.     q->superblocktype_2_3 = (header.type == 2 || header.type == 3);
                                                       ^
1239.     packet_bytes = (q->compressed_size - get_bits_count(&gb) / 8);
1240. 

libavcodec/qdm2.c:1238:30: 
1236.     }
1237. 
1238.     q->superblocktype_2_3 = (header.type == 2 || header.type == 3);
                                   ^
1239.     packet_bytes = (q->compressed_size - get_bits_count(&gb) / 8);
1240. 

libavcodec/qdm2.c:1238:5: 
1236.     }
1237. 
1238.     q->superblocktype_2_3 = (header.type == 2 || header.type == 3);
          ^
1239.     packet_bytes = (q->compressed_size - get_bits_count(&gb) / 8);
1240. 

libavcodec/qdm2.c:1239:5: 
1237. 
1238.     q->superblocktype_2_3 = (header.type == 2 || header.type == 3);
1239.     packet_bytes = (q->compressed_size - get_bits_count(&gb) / 8);
          ^
1240. 
1241.     init_get_bits(&gb, header.data, header.size*8);

libavcodec/bitstream.h:464:1: start of procedure get_bits_count()
  462.         ((uint32_t)name##_cache)
  463. 
  464. static inline int get_bits_count(GetBitContext *s){
       ^
  465.     return s->index;
  466. }

libavcodec/bitstream.h:465:5: 
  463. 
  464. static inline int get_bits_count(GetBitContext *s){
  465.     return s->index;
           ^
  466. }
  467. 

libavcodec/bitstream.h:466:1: return from a call to get_bits_count
  464. static inline int get_bits_count(GetBitContext *s){
  465.     return s->index;
  466. }
       ^
  467. 
  468. static inline void skip_bits_long(GetBitContext *s, int n){

libavcodec/qdm2.c:1241:5: 
1239.     packet_bytes = (q->compressed_size - get_bits_count(&gb) / 8);
1240. 
1241.     init_get_bits(&gb, header.data, header.size*8);
          ^
1242. 
1243.     if (header.type == 2 || header.type == 4 || header.type == 5) {

libavcodec/bitstream.h:758:1: start of procedure init_get_bits()
  756.  * @param bit_size the size of the buffer in bits
  757.  */
  758. static inline void init_get_bits(GetBitContext *s,
       ^
  759.                    const uint8_t *buffer, int bit_size)
  760. {

libavcodec/bitstream.h:761:5: 
  759.                    const uint8_t *buffer, int bit_size)
  760. {
  761.     int buffer_size= (bit_size+7)>>3;
           ^
  762.     if(buffer_size < 0 || bit_size < 0) {
  763.         buffer_size = bit_size = 0;

libavcodec/bitstream.h:762:8: Taking true branch
  760. {
  761.     int buffer_size= (bit_size+7)>>3;
  762.     if(buffer_size < 0 || bit_size < 0) {
              ^
  763.         buffer_size = bit_size = 0;
  764.         buffer = NULL;

libavcodec/bitstream.h:763:9: 
  761.     int buffer_size= (bit_size+7)>>3;
  762.     if(buffer_size < 0 || bit_size < 0) {
  763.         buffer_size = bit_size = 0;
               ^
  764.         buffer = NULL;
  765.     }

libavcodec/bitstream.h:764:9: 
  762.     if(buffer_size < 0 || bit_size < 0) {
  763.         buffer_size = bit_size = 0;
  764.         buffer = NULL;
               ^
  765.     }
  766. 

libavcodec/bitstream.h:767:5: 
  765.     }
  766. 
  767.     s->buffer= buffer;
           ^
  768.     s->size_in_bits= bit_size;
  769.     s->buffer_end= buffer + buffer_size;

libavcodec/bitstream.h:768:5: 
  766. 
  767.     s->buffer= buffer;
  768.     s->size_in_bits= bit_size;
           ^
  769.     s->buffer_end= buffer + buffer_size;
  770. #ifdef ALT_BITSTREAM_READER

libavcodec/bitstream.h:769:5: 
  767.     s->buffer= buffer;
  768.     s->size_in_bits= bit_size;
  769.     s->buffer_end= buffer + buffer_size;
           ^
  770. #ifdef ALT_BITSTREAM_READER
  771.     s->index=0;

libavcodec/bitstream.h:771:5: 
  769.     s->buffer_end= buffer + buffer_size;
  770. #ifdef ALT_BITSTREAM_READER
  771.     s->index=0;
           ^
  772. #elif defined LIBMPEG2_BITSTREAM_READER
  773.     s->buffer_ptr = (uint8_t*)((intptr_t)buffer&(~1));

libavcodec/bitstream.h:781:1: return from a call to init_get_bits
  779.     skip_bits_long(s, 0);
  780. #endif
  781. }
       ^
  782. 
  783. static inline void align_get_bits(GetBitContext *s)

libavcodec/qdm2.c:1243:9: Taking false branch
1241.     init_get_bits(&gb, header.data, header.size*8);
1242. 
1243.     if (header.type == 2 || header.type == 4 || header.type == 5) {
              ^
1244.         int csum = 257 * get_bits(&gb, 8) + 2 * get_bits(&gb, 8);
1245. 

libavcodec/qdm2.c:1243:29: Taking false branch
1241.     init_get_bits(&gb, header.data, header.size*8);
1242. 
1243.     if (header.type == 2 || header.type == 4 || header.type == 5) {
                                  ^
1244.         int csum = 257 * get_bits(&gb, 8) + 2 * get_bits(&gb, 8);
1245. 

libavcodec/qdm2.c:1243:49: Taking true branch
1241.     init_get_bits(&gb, header.data, header.size*8);
1242. 
1243.     if (header.type == 2 || header.type == 4 || header.type == 5) {
                                                      ^
1244.         int csum = 257 * get_bits(&gb, 8) + 2 * get_bits(&gb, 8);
1245. 

libavcodec/qdm2.c:1244:9: 
1242. 
1243.     if (header.type == 2 || header.type == 4 || header.type == 5) {
1244.         int csum = 257 * get_bits(&gb, 8) + 2 * get_bits(&gb, 8);
              ^
1245. 
1246.         csum = qdm2_packet_checksum(q->compressed_data, q->checksum_size, csum);

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

libavcodec/bitstream.h:657:5: 
  655. static inline unsigned int get_bits(GetBitContext *s, int n){
  656.     register int tmp;
  657.     OPEN_READER(re, s)
           ^
  658.     UPDATE_CACHE(re, s)
  659.     tmp= SHOW_UBITS(re, s, n);

libavcodec/bitstream.h:658:5: 
  656.     register int tmp;
  657.     OPEN_READER(re, s)
  658.     UPDATE_CACHE(re, s)
           ^
  659.     tmp= SHOW_UBITS(re, s, n);
  660.     LAST_SKIP_BITS(re, s, n)
