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

ffmpeg.c:3672:1: start of procedure new_subtitle_stream()
3670. }
3671. 
3672. static void new_subtitle_stream(AVFormatContext *oc, int file_idx)
      ^
3673. {
3674.     AVStream *st;

ffmpeg.c:3676:5: 
3674.     AVStream *st;
3675.     AVOutputStream *ost;
3676.     AVCodec *codec=NULL;
          ^
3677.     AVCodecContext *subtitle_enc;
3678.     enum CodecID codec_id = CODEC_ID_NONE;

ffmpeg.c:3678:5: 
3676.     AVCodec *codec=NULL;
3677.     AVCodecContext *subtitle_enc;
3678.     enum CodecID codec_id = CODEC_ID_NONE;
          ^
3679. 
3680.     st = av_new_stream(oc, oc->nb_streams < nb_streamid_map ? streamid_map[oc->nb_streams] : 0);

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

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

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

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

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

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

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

ffmpeg.c:3682:9: 
3680.     st = av_new_stream(oc, oc->nb_streams < nb_streamid_map ? streamid_map[oc->nb_streams] : 0);
3681.     if (!st) {
3682.         fprintf(stderr, "Could not alloc stream\n");
              ^
3683.         ffmpeg_exit(1);
3684.     }

ffmpeg.c:3683:9: Skipping ffmpeg_exit(): empty list of specs
3681.     if (!st) {
3682.         fprintf(stderr, "Could not alloc stream\n");
3683.         ffmpeg_exit(1);
              ^
3684.     }
3685.     ost = new_output_stream(oc, file_idx);

ffmpeg.c:3685:5: Skipping new_output_stream(): empty list of specs
3683.         ffmpeg_exit(1);
3684.     }
3685.     ost = new_output_stream(oc, file_idx);
          ^
3686.     subtitle_enc = st->codec;
3687.     output_codecs = grow_array(output_codecs, sizeof(*output_codecs), &nb_output_codecs, nb_output_codecs + 1);

ffmpeg.c:3686:5: 
3684.     }
3685.     ost = new_output_stream(oc, file_idx);
3686.     subtitle_enc = st->codec;
          ^
3687.     output_codecs = grow_array(output_codecs, sizeof(*output_codecs), &nb_output_codecs, nb_output_codecs + 1);
3688.     if(!subtitle_stream_copy){
