ffmpeg.c:3592: error: Null Dereference
  pointer `st` last assigned on line 3586 could be null and is dereferenced at line 3592, column 16.

ffmpeg.c:3579:1: start of procedure new_data_stream()
3577. }
3578. 
3579. static void new_data_stream(AVFormatContext *oc, int file_idx)
      ^
3580. {
3581.     AVStream *st;

ffmpeg.c:3583:5: 
3581.     AVStream *st;
3582.     AVOutputStream *ost;
3583.     AVCodec *codec=NULL;
          ^
3584.     AVCodecContext *data_enc;
3585. 

ffmpeg.c:3586:28: Condition is true
3584.     AVCodecContext *data_enc;
3585. 
3586.     st = av_new_stream(oc, oc->nb_streams < nb_streamid_map ? streamid_map[oc->nb_streams] : 0);
                                 ^
3587.     if (!st) {
3588.         fprintf(stderr, "Could not alloc stream\n");

ffmpeg.c:3586:5: 
3584.     AVCodecContext *data_enc;
3585. 
3586.     st = av_new_stream(oc, oc->nb_streams < nb_streamid_map ? streamid_map[oc->nb_streams] : 0);
          ^
3587.     if (!st) {
3588.         fprintf(stderr, "Could not alloc stream\n");

libavformat/utils.c:2585:1: start of procedure av_new_stream()
  2583. }
  2584. 
  2585. AVStream *av_new_stream(AVFormatContext *s, int id)
        ^
  2586. {
  2587.     AVStream *st;

libavformat/utils.c:2591:9: Taking true branch
  2589.     AVStream **streams;
  2590. 
  2591.     if (s->nb_streams >= INT_MAX/sizeof(*streams))
                ^
  2592.         return NULL;
  2593.     streams = av_realloc(s->streams, (s->nb_streams + 1) * sizeof(*streams));

libavformat/utils.c:2592:9: 
  2590. 
  2591.     if (s->nb_streams >= INT_MAX/sizeof(*streams))
  2592.         return NULL;
                ^
  2593.     streams = av_realloc(s->streams, (s->nb_streams + 1) * sizeof(*streams));
  2594.     if (!streams)

libavformat/utils.c:2634:1: return from a call to av_new_stream
  2632.     s->streams[s->nb_streams++] = st;
  2633.     return st;
  2634. }
        ^
  2635. 
  2636. AVProgram *av_new_program(AVFormatContext *ac, int id)

ffmpeg.c:3587:10: Taking true branch
3585. 
3586.     st = av_new_stream(oc, oc->nb_streams < nb_streamid_map ? streamid_map[oc->nb_streams] : 0);
3587.     if (!st) {
               ^
3588.         fprintf(stderr, "Could not alloc stream\n");
3589.         ffmpeg_exit(1);

ffmpeg.c:3588:9: 
3586.     st = av_new_stream(oc, oc->nb_streams < nb_streamid_map ? streamid_map[oc->nb_streams] : 0);
3587.     if (!st) {
3588.         fprintf(stderr, "Could not alloc stream\n");
              ^
3589.         ffmpeg_exit(1);
3590.     }

ffmpeg.c:3589:9: Skipping ffmpeg_exit(): empty list of specs
3587.     if (!st) {
3588.         fprintf(stderr, "Could not alloc stream\n");
3589.         ffmpeg_exit(1);
              ^
3590.     }
3591.     ost = new_output_stream(oc, file_idx);

ffmpeg.c:3591:5: Skipping new_output_stream(): empty list of specs
3589.         ffmpeg_exit(1);
3590.     }
3591.     ost = new_output_stream(oc, file_idx);
          ^
3592.     data_enc = st->codec;
3593.     output_codecs = grow_array(output_codecs, sizeof(*output_codecs), &nb_output_codecs, nb_output_codecs + 1);

ffmpeg.c:3592:5: 
3590.     }
3591.     ost = new_output_stream(oc, file_idx);
3592.     data_enc = st->codec;
          ^
3593.     output_codecs = grow_array(output_codecs, sizeof(*output_codecs), &nb_output_codecs, nb_output_codecs + 1);
3594.     if (!data_stream_copy) {
