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

ffmpeg.c:3655:1: start of procedure new_subtitle_stream()
3653. }
3654. 
3655. static void new_subtitle_stream(AVFormatContext *oc, int file_idx)
      ^
3656. {
3657.     AVStream *st;

ffmpeg.c:3659:5: 
3657.     AVStream *st;
3658.     AVOutputStream *ost;
3659.     AVCodec *codec=NULL;
          ^
3660.     AVCodecContext *subtitle_enc;
3661.     enum CodecID codec_id = CODEC_ID_NONE;

ffmpeg.c:3661:5: 
3659.     AVCodec *codec=NULL;
3660.     AVCodecContext *subtitle_enc;
3661.     enum CodecID codec_id = CODEC_ID_NONE;
          ^
3662. 
3663.     st = av_new_stream(oc, oc->nb_streams < nb_streamid_map ? streamid_map[oc->nb_streams] : 0);

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

ffmpeg.c:3663:5: 
3661.     enum CodecID codec_id = CODEC_ID_NONE;
3662. 
3663.     st = av_new_stream(oc, oc->nb_streams < nb_streamid_map ? streamid_map[oc->nb_streams] : 0);
          ^
3664.     if (!st) {
3665.         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:3664:10: Taking true branch
3662. 
3663.     st = av_new_stream(oc, oc->nb_streams < nb_streamid_map ? streamid_map[oc->nb_streams] : 0);
3664.     if (!st) {
               ^
3665.         fprintf(stderr, "Could not alloc stream\n");
3666.         ffmpeg_exit(1);

ffmpeg.c:3665:9: 
3663.     st = av_new_stream(oc, oc->nb_streams < nb_streamid_map ? streamid_map[oc->nb_streams] : 0);
3664.     if (!st) {
3665.         fprintf(stderr, "Could not alloc stream\n");
              ^
3666.         ffmpeg_exit(1);
3667.     }

ffmpeg.c:3666:9: Skipping ffmpeg_exit(): empty list of specs
3664.     if (!st) {
3665.         fprintf(stderr, "Could not alloc stream\n");
3666.         ffmpeg_exit(1);
              ^
3667.     }
3668.     ost = new_output_stream(oc, file_idx);

ffmpeg.c:3668:5: Skipping new_output_stream(): empty list of specs
3666.         ffmpeg_exit(1);
3667.     }
3668.     ost = new_output_stream(oc, file_idx);
          ^
3669.     subtitle_enc = st->codec;
3670.     output_codecs = grow_array(output_codecs, sizeof(*output_codecs), &nb_output_codecs, nb_output_codecs + 1);

ffmpeg.c:3669:5: 
3667.     }
3668.     ost = new_output_stream(oc, file_idx);
3669.     subtitle_enc = st->codec;
          ^
3670.     output_codecs = grow_array(output_codecs, sizeof(*output_codecs), &nb_output_codecs, nb_output_codecs + 1);
3671.     if(!subtitle_stream_copy){
