ffmpeg.c:3629: error: Null Dereference
  pointer `st` last assigned on line 3623 could be null and is dereferenced at line 3629, 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:3620:5: 
3618. {
3619.     AVStream *st;
3620.     AVCodec *codec=NULL;
          ^
3621.     AVCodecContext *data_enc;
3622. 

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

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

libavformat/utils.c:2598:1: start of procedure av_new_stream()
  2596. }
  2597. 
  2598. AVStream *av_new_stream(AVFormatContext *s, int id)
        ^
  2599. {
  2600.     AVStream *st;

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

libavformat/utils.c:2605:9: 
  2603. 
  2604.     if (s->nb_streams >= INT_MAX/sizeof(*streams))
  2605.         return NULL;
                ^
  2606.     streams = av_realloc(s->streams, (s->nb_streams + 1) * sizeof(*streams));
  2607.     if (!streams)

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

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

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

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

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

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