libavcodec/flacdec.c:633: error: Null Dereference
  pointer `s->bitstream` last assigned on line 629 could be null and is dereferenced at line 633, column 38.

libavcodec/flacdec.c:615:1: start of procedure flac_decode_frame()
613. }
614. 
615. static int flac_decode_frame(AVCodecContext *avctx,
     ^
616.                             void *data, int *data_size,
617.                             const uint8_t *buf, int buf_size)

libavcodec/flacdec.c:619:5: 
617.                             const uint8_t *buf, int buf_size)
618. {
619.     FLACContext *s = avctx->priv_data;
         ^
620.     int i, j = 0, input_buf_size = 0, bytes_read = 0;
621.     int16_t *samples_16 = data;

libavcodec/flacdec.c:620:5: 
618. {
619.     FLACContext *s = avctx->priv_data;
620.     int i, j = 0, input_buf_size = 0, bytes_read = 0;
         ^
621.     int16_t *samples_16 = data;
622.     int32_t *samples_32 = data;

libavcodec/flacdec.c:621:5: 
619.     FLACContext *s = avctx->priv_data;
620.     int i, j = 0, input_buf_size = 0, bytes_read = 0;
621.     int16_t *samples_16 = data;
         ^
622.     int32_t *samples_32 = data;
623.     int alloc_data_size= *data_size;

libavcodec/flacdec.c:622:5: 
620.     int i, j = 0, input_buf_size = 0, bytes_read = 0;
621.     int16_t *samples_16 = data;
622.     int32_t *samples_32 = data;
         ^
623.     int alloc_data_size= *data_size;
624. 

libavcodec/flacdec.c:623:5: 
621.     int16_t *samples_16 = data;
622.     int32_t *samples_32 = data;
623.     int alloc_data_size= *data_size;
         ^
624. 
625.     *data_size=0;

libavcodec/flacdec.c:625:5: 
623.     int alloc_data_size= *data_size;
624. 
625.     *data_size=0;
         ^
626. 
627.     if (s->max_framesize == 0) {

libavcodec/flacdec.c:627:9: Taking true branch
625.     *data_size=0;
626. 
627.     if (s->max_framesize == 0) {
             ^
628.         s->max_framesize= FFMAX(4, buf_size); // should hopefully be enough for the first header
629.         s->bitstream= av_fast_realloc(s->bitstream, &s->allocated_bitstream_size, s->max_framesize);

libavcodec/flacdec.c:628:27: Condition is false
626. 
627.     if (s->max_framesize == 0) {
628.         s->max_framesize= FFMAX(4, buf_size); // should hopefully be enough for the first header
                               ^
629.         s->bitstream= av_fast_realloc(s->bitstream, &s->allocated_bitstream_size, s->max_framesize);
630.     }

libavcodec/flacdec.c:628:9: 
626. 
627.     if (s->max_framesize == 0) {
628.         s->max_framesize= FFMAX(4, buf_size); // should hopefully be enough for the first header
             ^
629.         s->bitstream= av_fast_realloc(s->bitstream, &s->allocated_bitstream_size, s->max_framesize);
630.     }

libavcodec/flacdec.c:629:9: 
627.     if (s->max_framesize == 0) {
628.         s->max_framesize= FFMAX(4, buf_size); // should hopefully be enough for the first header
629.         s->bitstream= av_fast_realloc(s->bitstream, &s->allocated_bitstream_size, s->max_framesize);
             ^
630.     }
631. 

libavcodec/utils.c:69:1: start of procedure av_fast_realloc()
  67. static int volatile entangled_thread_counter=0;
  68. 
  69. void *av_fast_realloc(void *ptr, unsigned int *size, unsigned int min_size)
      ^
  70. {
  71.     if(min_size < *size)

libavcodec/utils.c:71:8: Taking false branch
  69. void *av_fast_realloc(void *ptr, unsigned int *size, unsigned int min_size)
  70. {
  71.     if(min_size < *size)
             ^
  72.         return ptr;
  73. 

libavcodec/utils.c:74:12: Condition is false
  72.         return ptr;
  73. 
  74.     *size= FFMAX(17*min_size/16 + 32, min_size);
                 ^
  75. 
  76.     ptr= av_realloc(ptr, *size);

libavcodec/utils.c:74:5: 
  72.         return ptr;
  73. 
  74.     *size= FFMAX(17*min_size/16 + 32, min_size);
          ^
  75. 
  76.     ptr= av_realloc(ptr, *size);

libavcodec/utils.c:76:5: 
  74.     *size= FFMAX(17*min_size/16 + 32, min_size);
  75. 
  76.     ptr= av_realloc(ptr, *size);
          ^
  77.     if(!ptr) //we could set this to the unmodified min_size but this is safer if the user lost the ptr and uses NULL now
  78.         *size= 0;

libavutil/mem.c:102:1: start of procedure av_realloc()
    100. }
    101. 
    102. void *av_realloc(void *ptr, unsigned int size)
         ^
    103. {
    104. #if CONFIG_MEMALIGN_HACK

libavutil/mem.c:109:8: Taking true branch
    107. 
    108.     /* let's disallow possible ambiguous cases */
    109.     if(size > (INT_MAX-16) )
                ^
    110.         return NULL;
    111. 

libavutil/mem.c:110:9: 
    108.     /* let's disallow possible ambiguous cases */
    109.     if(size > (INT_MAX-16) )
    110.         return NULL;
                 ^
    111. 
    112. #if CONFIG_MEMALIGN_HACK

libavutil/mem.c:120:1: return from a call to av_realloc
    118.     return realloc(ptr, size);
    119. #endif
    120. }
         ^
    121. 
    122. void av_free(void *ptr)

libavcodec/utils.c:77:9: Taking true branch
  75. 
  76.     ptr= av_realloc(ptr, *size);
  77.     if(!ptr) //we could set this to the unmodified min_size but this is safer if the user lost the ptr and uses NULL now
              ^
  78.         *size= 0;
  79. 

libavcodec/utils.c:78:9: 
  76.     ptr= av_realloc(ptr, *size);
  77.     if(!ptr) //we could set this to the unmodified min_size but this is safer if the user lost the ptr and uses NULL now
  78.         *size= 0;
              ^
  79. 
  80.     return ptr;

libavcodec/utils.c:80:5: 
  78.         *size= 0;
  79. 
  80.     return ptr;
          ^
  81. }
  82. 

libavcodec/utils.c:81:1: return from a call to av_fast_realloc
  79. 
  80.     return ptr;
  81. }
      ^
  82. 
  83. /* encoder management */

libavcodec/flacdec.c:632:9: Taking true branch
630.     }
631. 
632.     if (1 && s->max_framesize) { //FIXME truncated
             ^
633.         if (s->bitstream_size < 4 || AV_RL32(s->bitstream) != MKTAG('f','L','a','C'))
634.             buf_size= FFMIN(buf_size, s->max_framesize - FFMIN(s->bitstream_size, s->max_framesize));

libavcodec/flacdec.c:632:14: Taking true branch
630.     }
631. 
632.     if (1 && s->max_framesize) { //FIXME truncated
                  ^
633.         if (s->bitstream_size < 4 || AV_RL32(s->bitstream) != MKTAG('f','L','a','C'))
634.             buf_size= FFMIN(buf_size, s->max_framesize - FFMIN(s->bitstream_size, s->max_framesize));

libavcodec/flacdec.c:633:13: Taking false branch
631. 
632.     if (1 && s->max_framesize) { //FIXME truncated
633.         if (s->bitstream_size < 4 || AV_RL32(s->bitstream) != MKTAG('f','L','a','C'))
                 ^
634.             buf_size= FFMIN(buf_size, s->max_framesize - FFMIN(s->bitstream_size, s->max_framesize));
635.         input_buf_size= buf_size;

libavcodec/flacdec.c:633:38: 
631. 
632.     if (1 && s->max_framesize) { //FIXME truncated
633.         if (s->bitstream_size < 4 || AV_RL32(s->bitstream) != MKTAG('f','L','a','C'))
                                          ^
634.             buf_size= FFMIN(buf_size, s->max_framesize - FFMIN(s->bitstream_size, s->max_framesize));
635.         input_buf_size= buf_size;
