ffmpeg.c:3675: error: Null Dereference
  pointer `st` last assigned on line 3669 could be null and is dereferenced at line 3675, column 20.

ffmpeg.c:3661:1: start of procedure new_subtitle_stream()
3659. }
3660. 
3661. static void new_subtitle_stream(AVFormatContext *oc, int file_idx)
      ^
3662. {
3663.     AVStream *st;

ffmpeg.c:3665:5: 
3663.     AVStream *st;
3664.     AVOutputStream *ost;
3665.     AVCodec *codec=NULL;
          ^
3666.     AVCodecContext *subtitle_enc;
3667.     enum CodecID codec_id = CODEC_ID_NONE;

ffmpeg.c:3667:5: 
3665.     AVCodec *codec=NULL;
3666.     AVCodecContext *subtitle_enc;
3667.     enum CodecID codec_id = CODEC_ID_NONE;
          ^
3668. 
3669.     st = av_new_stream(oc, oc->nb_streams < nb_streamid_map ? streamid_map[oc->nb_streams] : 0);

ffmpeg.c:3669:28: Condition is true
3667.     enum CodecID codec_id = CODEC_ID_NONE;
3668. 
3669.     st = av_new_stream(oc, oc->nb_streams < nb_streamid_map ? streamid_map[oc->nb_streams] : 0);
                                 ^
3670.     if (!st) {
3671.         fprintf(stderr, "Could not alloc stream\n");

ffmpeg.c:3669:5: 
3667.     enum CodecID codec_id = CODEC_ID_NONE;
3668. 
3669.     st = av_new_stream(oc, oc->nb_streams < nb_streamid_map ? streamid_map[oc->nb_streams] : 0);
          ^
3670.     if (!st) {
3671.         fprintf(stderr, "Could not alloc stream\n");

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

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

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

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

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

ffmpeg.c:3671:9: 
3669.     st = av_new_stream(oc, oc->nb_streams < nb_streamid_map ? streamid_map[oc->nb_streams] : 0);
3670.     if (!st) {
3671.         fprintf(stderr, "Could not alloc stream\n");
              ^
3672.         ffmpeg_exit(1);
3673.     }

ffmpeg.c:3672:9: Skipping ffmpeg_exit(): empty list of specs
3670.     if (!st) {
3671.         fprintf(stderr, "Could not alloc stream\n");
3672.         ffmpeg_exit(1);
              ^
3673.     }
3674.     ost = new_output_stream(oc, file_idx);

ffmpeg.c:3674:5: Skipping new_output_stream(): empty list of specs
3672.         ffmpeg_exit(1);
3673.     }
3674.     ost = new_output_stream(oc, file_idx);
          ^
3675.     subtitle_enc = st->codec;
3676.     output_codecs = grow_array(output_codecs, sizeof(*output_codecs), &nb_output_codecs, nb_output_codecs + 1);

ffmpeg.c:3675:5: 
3673.     }
3674.     ost = new_output_stream(oc, file_idx);
3675.     subtitle_enc = st->codec;
          ^
3676.     output_codecs = grow_array(output_codecs, sizeof(*output_codecs), &nb_output_codecs, nb_output_codecs + 1);
3677.     if(!subtitle_stream_copy){
