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

ffmpeg.c:3617:1: start of procedure new_data_stream()
3615. }
3616. 
3617. static void new_data_stream(AVFormatContext *oc, int file_idx)
      ^
3618. {
3619.     AVStream *st;

ffmpeg.c:3621:5: 
3619.     AVStream *st;
3620.     AVOutputStream *ost;
3621.     AVCodec *codec=NULL;
          ^
3622.     AVCodecContext *data_enc;
3623. 

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

ffmpeg.c:3624:5: 
3622.     AVCodecContext *data_enc;
3623. 
3624.     st = av_new_stream(oc, oc->nb_streams < nb_streamid_map ? streamid_map[oc->nb_streams] : 0);
          ^
3625.     if (!st) {
3626.         fprintf(stderr, "Could not alloc stream\n");

libavformat/utils.c:2594:1: start of procedure av_new_stream()
  2592. }
  2593. 
  2594. AVStream *av_new_stream(AVFormatContext *s, int id)
        ^
  2595. {
  2596.     AVStream *st;

libavformat/utils.c:2600:9: Taking true branch
  2598.     AVStream **streams;
  2599. 
  2600.     if (s->nb_streams >= INT_MAX/sizeof(*streams))
                ^
  2601.         return NULL;
  2602.     streams = av_realloc(s->streams, (s->nb_streams + 1) * sizeof(*streams));

libavformat/utils.c:2601:9: 
  2599. 
  2600.     if (s->nb_streams >= INT_MAX/sizeof(*streams))
  2601.         return NULL;
                ^
  2602.     streams = av_realloc(s->streams, (s->nb_streams + 1) * sizeof(*streams));
  2603.     if (!streams)

libavformat/utils.c:2643:1: return from a call to av_new_stream
  2641.     s->streams[s->nb_streams++] = st;
  2642.     return st;
  2643. }
        ^
  2644. 
  2645. AVProgram *av_new_program(AVFormatContext *ac, int id)

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

ffmpeg.c:3626:9: 
3624.     st = av_new_stream(oc, oc->nb_streams < nb_streamid_map ? streamid_map[oc->nb_streams] : 0);
3625.     if (!st) {
3626.         fprintf(stderr, "Could not alloc stream\n");
              ^
3627.         ffmpeg_exit(1);
3628.     }

ffmpeg.c:3627:9: Skipping ffmpeg_exit(): empty list of specs
3625.     if (!st) {
3626.         fprintf(stderr, "Could not alloc stream\n");
3627.         ffmpeg_exit(1);
              ^
3628.     }
3629.     ost = new_output_stream(oc, file_idx);

ffmpeg.c:3629:5: Skipping new_output_stream(): empty list of specs
3627.         ffmpeg_exit(1);
3628.     }
3629.     ost = new_output_stream(oc, file_idx);
          ^
3630.     data_enc = st->codec;
3631.     output_codecs = grow_array(output_codecs, sizeof(*output_codecs), &nb_output_codecs, nb_output_codecs + 1);

ffmpeg.c:3630:5: 
3628.     }
3629.     ost = new_output_stream(oc, file_idx);
3630.     data_enc = st->codec;
          ^
3631.     output_codecs = grow_array(output_codecs, sizeof(*output_codecs), &nb_output_codecs, nb_output_codecs + 1);
3632.     if (!data_stream_copy) {
