libavcodec/mpegaudiodec.c:2525: error: Null Dereference
  pointer `s->mp3decctx[0]` last assigned on line 2519 could be null and is dereferenced at line 2525, column 5.

libavcodec/mpegaudiodec.c:2495:1: start of procedure decode_init_mp3on4()
2493. 
2494. 
2495. static int decode_init_mp3on4(AVCodecContext * avctx)
      ^
2496. {
2497.     MP3On4DecodeContext *s = avctx->priv_data;

libavcodec/mpegaudiodec.c:2497:5: 
2495. static int decode_init_mp3on4(AVCodecContext * avctx)
2496. {
2497.     MP3On4DecodeContext *s = avctx->priv_data;
          ^
2498.     int i;
2499. 

libavcodec/mpegaudiodec.c:2500:10: Taking false branch
2498.     int i;
2499. 
2500.     if ((avctx->extradata_size < 2) || (avctx->extradata == NULL)) {
               ^
2501.         av_log(avctx, AV_LOG_ERROR, "Codec extradata missing or too short.\n");
2502.         return -1;

libavcodec/mpegaudiodec.c:2500:41: Taking false branch
2498.     int i;
2499. 
2500.     if ((avctx->extradata_size < 2) || (avctx->extradata == NULL)) {
                                              ^
2501.         av_log(avctx, AV_LOG_ERROR, "Codec extradata missing or too short.\n");
2502.         return -1;

libavcodec/mpegaudiodec.c:2505:5: 
2503.     }
2504. 
2505.     s->chan_cfg = (((unsigned char *)avctx->extradata)[1] >> 3) & 0x0f;
          ^
2506.     s->frames = mp3Frames[s->chan_cfg];
2507.     if(!s->frames) {

libavcodec/mpegaudiodec.c:2506:5: 
2504. 
2505.     s->chan_cfg = (((unsigned char *)avctx->extradata)[1] >> 3) & 0x0f;
2506.     s->frames = mp3Frames[s->chan_cfg];
          ^
2507.     if(!s->frames) {
2508.         av_log(avctx, AV_LOG_ERROR, "Invalid channel config number.\n");

libavcodec/mpegaudiodec.c:2507:9: Taking false branch
2505.     s->chan_cfg = (((unsigned char *)avctx->extradata)[1] >> 3) & 0x0f;
2506.     s->frames = mp3Frames[s->chan_cfg];
2507.     if(!s->frames) {
              ^
2508.         av_log(avctx, AV_LOG_ERROR, "Invalid channel config number.\n");
2509.         return -1;

libavcodec/mpegaudiodec.c:2511:5: 
2509.         return -1;
2510.     }
2511.     avctx->channels = mp3Channels[s->chan_cfg];
          ^
2512. 
2513.     /* Init the first mp3 decoder in standard way, so that all tables get builded

libavcodec/mpegaudiodec.c:2519:5: 
2517.      */
2518.     // Allocate zeroed memory for the first decoder context
2519.     s->mp3decctx[0] = av_mallocz(sizeof(MPADecodeContext));
          ^
2520.     // Put decoder context in place to make init_decode() happy
2521.     avctx->priv_data = s->mp3decctx[0];

libavutil/mem.c:132:1: start of procedure av_mallocz()
  130. }
  131. 
  132. void *av_mallocz(unsigned int size)
       ^
  133. {
  134.     void *ptr = av_malloc(size);

libavutil/mem.c:134:5: 
  132. void *av_mallocz(unsigned int size)
  133. {
  134.     void *ptr = av_malloc(size);
           ^
  135.     if (ptr)
  136.         memset(ptr, 0, size);

libavutil/mem.c:42:1: start of procedure av_malloc()
    40.    linker will do it automatically */
    41. 
    42. void *av_malloc(unsigned int size)
        ^
    43. {
    44.     void *ptr;

libavutil/mem.c:50:8: Taking false branch
    48. 
    49.     /* let's disallow possible ambiguous cases */
    50.     if(size > (INT_MAX-16) )
               ^
    51.         return NULL;
    52. 

libavutil/mem.c:61:5: Skipping memalign(): method has no implementation
    59.     ((char*)ptr)[-1]= diff;
    60. #elif defined (HAVE_MEMALIGN)
    61.     ptr = memalign(16,size);
            ^
    62.     /* Why 64?
    63.        Indeed, we should align it:

libavutil/mem.c:91:5: 
    89.     ptr = malloc(size);
    90. #endif
    91.     return ptr;
            ^
    92. }
    93. 

libavutil/mem.c:92:1: return from a call to av_malloc
    90. #endif
    91.     return ptr;
    92. }
        ^
    93. 
    94. void *av_realloc(void *ptr, unsigned int size)

libavutil/mem.c:135:9: Taking false branch
  133. {
  134.     void *ptr = av_malloc(size);
  135.     if (ptr)
               ^
  136.         memset(ptr, 0, size);
  137.     return ptr;

libavutil/mem.c:137:5: 
  135.     if (ptr)
  136.         memset(ptr, 0, size);
  137.     return ptr;
           ^
  138. }
  139. 

libavutil/mem.c:138:1: return from a call to av_mallocz
  136.         memset(ptr, 0, size);
  137.     return ptr;
  138. }
       ^
  139. 
  140. char *av_strdup(const char *s)

libavcodec/mpegaudiodec.c:2521:5: 
2519.     s->mp3decctx[0] = av_mallocz(sizeof(MPADecodeContext));
2520.     // Put decoder context in place to make init_decode() happy
2521.     avctx->priv_data = s->mp3decctx[0];
          ^
2522.     decode_init(avctx);
2523.     // Restore mp3on4 context pointer

libavcodec/mpegaudiodec.c:2522:5: Skipping decode_init(): empty list of specs
2520.     // Put decoder context in place to make init_decode() happy
2521.     avctx->priv_data = s->mp3decctx[0];
2522.     decode_init(avctx);
          ^
2523.     // Restore mp3on4 context pointer
2524.     avctx->priv_data = s;

libavcodec/mpegaudiodec.c:2524:5: 
2522.     decode_init(avctx);
2523.     // Restore mp3on4 context pointer
2524.     avctx->priv_data = s;
          ^
2525.     s->mp3decctx[0]->adu_mode = 1; // Set adu mode
2526. 

libavcodec/mpegaudiodec.c:2525:5: 
2523.     // Restore mp3on4 context pointer
2524.     avctx->priv_data = s;
2525.     s->mp3decctx[0]->adu_mode = 1; // Set adu mode
          ^
2526. 
2527.     /* Create a separate codec/context for each frame (first is already ok).
