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

libavcodec/mpegaudiodec.c:2501:1: start of procedure decode_init_mp3on4()
2499. 
2500. 
2501. static int decode_init_mp3on4(AVCodecContext * avctx)
      ^
2502. {
2503.     MP3On4DecodeContext *s = avctx->priv_data;

libavcodec/mpegaudiodec.c:2503:5: 
2501. static int decode_init_mp3on4(AVCodecContext * avctx)
2502. {
2503.     MP3On4DecodeContext *s = avctx->priv_data;
          ^
2504.     MPEG4AudioConfig cfg;
2505.     int i;

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

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

libavcodec/mpegaudiodec.c:2512:5: Skipping ff_mpeg4audio_get_config(): empty list of specs
2510.     }
2511. 
2512.     ff_mpeg4audio_get_config(&cfg, avctx->extradata, avctx->extradata_size);
          ^
2513.     if (!cfg.chan_config || cfg.chan_config > 7) {
2514.         av_log(avctx, AV_LOG_ERROR, "Invalid channel config number.\n");

libavcodec/mpegaudiodec.c:2513:10: Taking false branch
2511. 
2512.     ff_mpeg4audio_get_config(&cfg, avctx->extradata, avctx->extradata_size);
2513.     if (!cfg.chan_config || cfg.chan_config > 7) {
               ^
2514.         av_log(avctx, AV_LOG_ERROR, "Invalid channel config number.\n");
2515.         return -1;

libavcodec/mpegaudiodec.c:2513:29: Taking false branch
2511. 
2512.     ff_mpeg4audio_get_config(&cfg, avctx->extradata, avctx->extradata_size);
2513.     if (!cfg.chan_config || cfg.chan_config > 7) {
                                  ^
2514.         av_log(avctx, AV_LOG_ERROR, "Invalid channel config number.\n");
2515.         return -1;

libavcodec/mpegaudiodec.c:2517:5: 
2515.         return -1;
2516.     }
2517.     s->frames = mp3Frames[cfg.chan_config];
          ^
2518.     s->coff = chan_offset[cfg.chan_config];
2519.     avctx->channels = ff_mpeg4audio_channels[cfg.chan_config];

libavcodec/mpegaudiodec.c:2518:5: 
2516.     }
2517.     s->frames = mp3Frames[cfg.chan_config];
2518.     s->coff = chan_offset[cfg.chan_config];
          ^
2519.     avctx->channels = ff_mpeg4audio_channels[cfg.chan_config];
2520. 

libavcodec/mpegaudiodec.c:2519:5: 
2517.     s->frames = mp3Frames[cfg.chan_config];
2518.     s->coff = chan_offset[cfg.chan_config];
2519.     avctx->channels = ff_mpeg4audio_channels[cfg.chan_config];
          ^
2520. 
2521.     if (cfg.sample_rate < 16000)

libavcodec/mpegaudiodec.c:2521:9: Taking true branch
2519.     avctx->channels = ff_mpeg4audio_channels[cfg.chan_config];
2520. 
2521.     if (cfg.sample_rate < 16000)
              ^
2522.         s->syncword = 0xffe00000;
2523.     else

libavcodec/mpegaudiodec.c:2522:9: 
2520. 
2521.     if (cfg.sample_rate < 16000)
2522.         s->syncword = 0xffe00000;
              ^
2523.     else
2524.         s->syncword = 0xfff00000;

libavcodec/mpegaudiodec.c:2532:5: 
2530.      */
2531.     // Allocate zeroed memory for the first decoder context
2532.     s->mp3decctx[0] = av_mallocz(sizeof(MPADecodeContext));
          ^
2533.     // Put decoder context in place to make init_decode() happy
2534.     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:2534:5: 
2532.     s->mp3decctx[0] = av_mallocz(sizeof(MPADecodeContext));
2533.     // Put decoder context in place to make init_decode() happy
2534.     avctx->priv_data = s->mp3decctx[0];
          ^
2535.     decode_init(avctx);
2536.     // Restore mp3on4 context pointer

libavcodec/mpegaudiodec.c:2535:5: Skipping decode_init(): empty list of specs
2533.     // Put decoder context in place to make init_decode() happy
2534.     avctx->priv_data = s->mp3decctx[0];
2535.     decode_init(avctx);
          ^
2536.     // Restore mp3on4 context pointer
2537.     avctx->priv_data = s;

libavcodec/mpegaudiodec.c:2537:5: 
2535.     decode_init(avctx);
2536.     // Restore mp3on4 context pointer
2537.     avctx->priv_data = s;
          ^
2538.     s->mp3decctx[0]->adu_mode = 1; // Set adu mode
2539. 

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