libavcodec/mlpdec.c:886: error: Null Dereference
  pointer `&gb->buffer` last assigned on line 884 could be null and is dereferenced by call to `show_bits_long()` at line 886, column 9.

libavcodec/mlpdec.c:863:1: start of procedure read_access_unit()
861.  *  otherwise returns the number of bytes consumed. */
862. 
863. static int read_access_unit(AVCodecContext *avctx, void* data, int *data_size,
     ^
864.                             const uint8_t *buf, int buf_size)
865. {

libavcodec/mlpdec.c:866:5: 
864.                             const uint8_t *buf, int buf_size)
865. {
866.     MLPDecodeContext *m = avctx->priv_data;
         ^
867.     GetBitContext gb;
868.     unsigned int length, substr;

libavcodec/mlpdec.c:870:5: 
868.     unsigned int length, substr;
869.     unsigned int substream_start;
870.     unsigned int header_size = 4;
         ^
871.     unsigned int substr_header_size = 0;
872.     uint8_t substream_parity_present[MAX_SUBSTREAMS];

libavcodec/mlpdec.c:871:5: 
869.     unsigned int substream_start;
870.     unsigned int header_size = 4;
871.     unsigned int substr_header_size = 0;
         ^
872.     uint8_t substream_parity_present[MAX_SUBSTREAMS];
873.     uint16_t substream_data_len[MAX_SUBSTREAMS];

libavcodec/mlpdec.c:876:9: Taking false branch
874.     uint8_t parity_bits;
875. 
876.     if (buf_size < 4)
             ^
877.         return 0;
878. 

libavcodec/mlpdec.c:879:5: 
877.         return 0;
878. 
879.     length = (AV_RB16(buf) & 0xfff) * 2;
         ^
880. 
881.     if (length > buf_size)

libavcodec/mlpdec.c:881:9: Taking false branch
879.     length = (AV_RB16(buf) & 0xfff) * 2;
880. 
881.     if (length > buf_size)
             ^
882.         return -1;
883. 

libavcodec/mlpdec.c:884:5: 
882.         return -1;
883. 
884.     init_get_bits(&gb, (buf + 4), (length - 4) * 8);
         ^
885. 
886.     if (show_bits_long(&gb, 31) == (0xf8726fba >> 1)) {

libavcodec/bitstream.h:745:1: start of procedure init_get_bits()
  743.  * @param bit_size the size of the buffer in bits
  744.  */
  745. static inline void init_get_bits(GetBitContext *s,
       ^
  746.                    const uint8_t *buffer, int bit_size)
  747. {

libavcodec/bitstream.h:748:5: 
  746.                    const uint8_t *buffer, int bit_size)
  747. {
  748.     int buffer_size= (bit_size+7)>>3;
           ^
  749.     if(buffer_size < 0 || bit_size < 0) {
  750.         buffer_size = bit_size = 0;

libavcodec/bitstream.h:749:8: Taking true branch
  747. {
  748.     int buffer_size= (bit_size+7)>>3;
  749.     if(buffer_size < 0 || bit_size < 0) {
              ^
  750.         buffer_size = bit_size = 0;
  751.         buffer = NULL;

libavcodec/bitstream.h:750:9: 
  748.     int buffer_size= (bit_size+7)>>3;
  749.     if(buffer_size < 0 || bit_size < 0) {
  750.         buffer_size = bit_size = 0;
               ^
  751.         buffer = NULL;
  752.     }

libavcodec/bitstream.h:751:9: 
  749.     if(buffer_size < 0 || bit_size < 0) {
  750.         buffer_size = bit_size = 0;
  751.         buffer = NULL;
               ^
  752.     }
  753. 

libavcodec/bitstream.h:754:5: 
  752.     }
  753. 
  754.     s->buffer= buffer;
           ^
  755.     s->size_in_bits= bit_size;
  756.     s->buffer_end= buffer + buffer_size;

libavcodec/bitstream.h:755:5: 
  753. 
  754.     s->buffer= buffer;
  755.     s->size_in_bits= bit_size;
           ^
  756.     s->buffer_end= buffer + buffer_size;
  757. #ifdef ALT_BITSTREAM_READER

libavcodec/bitstream.h:756:5: 
  754.     s->buffer= buffer;
  755.     s->size_in_bits= bit_size;
  756.     s->buffer_end= buffer + buffer_size;
           ^
  757. #ifdef ALT_BITSTREAM_READER
  758.     s->index=0;

libavcodec/bitstream.h:758:5: 
  756.     s->buffer_end= buffer + buffer_size;
  757. #ifdef ALT_BITSTREAM_READER
  758.     s->index=0;
           ^
  759. #elif defined LIBMPEG2_BITSTREAM_READER
  760.     s->buffer_ptr = (uint8_t*)((intptr_t)buffer&(~1));

libavcodec/bitstream.h:768:1: return from a call to init_get_bits
  766.     skip_bits_long(s, 0);
  767. #endif
  768. }
       ^
  769. 
  770. static inline void align_get_bits(GetBitContext *s)

libavcodec/mlpdec.c:886:9: 
884.     init_get_bits(&gb, (buf + 4), (length - 4) * 8);
885. 
886.     if (show_bits_long(&gb, 31) == (0xf8726fba >> 1)) {
             ^
887.         dprintf(m->avctx, "Found major sync.\n");
888.         if (read_major_sync(m, &gb) < 0)

libavcodec/bitstream.h:720:1: start of procedure show_bits_long()
  718.  * shows 0-32 bits.
  719.  */
  720. static inline unsigned int show_bits_long(GetBitContext *s, int n){
       ^
  721.     if(n<=17) return show_bits(s, n);
  722.     else{

libavcodec/bitstream.h:721:8: Taking true branch
  719.  */
  720. static inline unsigned int show_bits_long(GetBitContext *s, int n){
  721.     if(n<=17) return show_bits(s, n);
              ^
  722.     else{
  723.         GetBitContext gb= *s;

libavcodec/bitstream.h:721:15: 
  719.  */
  720. static inline unsigned int show_bits_long(GetBitContext *s, int n){
  721.     if(n<=17) return show_bits(s, n);
                     ^
  722.     else{
  723.         GetBitContext gb= *s;

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

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

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