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

ffmpeg.c:3537:1: start of procedure new_subtitle_stream()
3535. }
3536. 
3537. static void new_subtitle_stream(AVFormatContext *oc, int file_idx)
      ^
3538. {
3539.     AVStream *st;

ffmpeg.c:3541:5: 
3539.     AVStream *st;
3540.     AVOutputStream *ost;
3541.     AVCodec *codec=NULL;
          ^
3542.     AVCodecContext *subtitle_enc;
3543.     enum CodecID codec_id = CODEC_ID_NONE;

ffmpeg.c:3543:5: 
3541.     AVCodec *codec=NULL;
3542.     AVCodecContext *subtitle_enc;
3543.     enum CodecID codec_id = CODEC_ID_NONE;
          ^
3544. 
3545.     st = av_new_stream(oc, oc->nb_streams < nb_streamid_map ? streamid_map[oc->nb_streams] : 0);

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

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

libavformat/utils.c:2646:1: start of procedure av_new_stream()
  2644. }
  2645. 
  2646. AVStream *av_new_stream(AVFormatContext *s, int id)
        ^
  2647. {
  2648.     AVStream *st;

libavformat/utils.c:2652:9: Taking true branch
  2650. 
  2651. #if FF_API_MAX_STREAMS
  2652.     if (s->nb_streams >= MAX_STREAMS){
                ^
  2653.         av_log(s, AV_LOG_ERROR, "Too many streams\n");
  2654.         return NULL;

libavformat/utils.c:2653:9: Skipping av_log(): empty list of specs
  2651. #if FF_API_MAX_STREAMS
  2652.     if (s->nb_streams >= MAX_STREAMS){
  2653.         av_log(s, AV_LOG_ERROR, "Too many streams\n");
                ^
  2654.         return NULL;
  2655.     }

libavformat/utils.c:2654:9: 
  2652.     if (s->nb_streams >= MAX_STREAMS){
  2653.         av_log(s, AV_LOG_ERROR, "Too many streams\n");
  2654.         return NULL;
                ^
  2655.     }
  2656. #else

libavformat/utils.c:2703:1: return from a call to av_new_stream
  2701.     s->streams[s->nb_streams++] = st;
  2702.     return st;
  2703. }
        ^
  2704. 
  2705. AVProgram *av_new_program(AVFormatContext *ac, int id)

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

ffmpeg.c:3547:9: 
3545.     st = av_new_stream(oc, oc->nb_streams < nb_streamid_map ? streamid_map[oc->nb_streams] : 0);
3546.     if (!st) {
3547.         fprintf(stderr, "Could not alloc stream\n");
              ^
3548.         ffmpeg_exit(1);
3549.     }

ffmpeg.c:3548:9: Skipping ffmpeg_exit(): empty list of specs
3546.     if (!st) {
3547.         fprintf(stderr, "Could not alloc stream\n");
3548.         ffmpeg_exit(1);
              ^
3549.     }
3550.     ost = new_output_stream(oc, file_idx);

ffmpeg.c:3550:5: Skipping new_output_stream(): empty list of specs
3548.         ffmpeg_exit(1);
3549.     }
3550.     ost = new_output_stream(oc, file_idx);
          ^
3551.     subtitle_enc = st->codec;
3552.     output_codecs = grow_array(output_codecs, sizeof(*output_codecs), &nb_output_codecs, nb_output_codecs + 1);

ffmpeg.c:3551:5: 
3549.     }
3550.     ost = new_output_stream(oc, file_idx);
3551.     subtitle_enc = st->codec;
          ^
3552.     output_codecs = grow_array(output_codecs, sizeof(*output_codecs), &nb_output_codecs, nb_output_codecs + 1);
3553.     if(!subtitle_stream_copy){
