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

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

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

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

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

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

libavformat/utils.c:2633:1: start of procedure av_new_stream()
  2631. }
  2632. 
  2633. AVStream *av_new_stream(AVFormatContext *s, int id)
        ^
  2634. {
  2635.     AVStream *st;

libavformat/utils.c:2639:9: Taking true branch
  2637. 
  2638. #if FF_API_MAX_STREAMS
  2639.     if (s->nb_streams >= MAX_STREAMS){
                ^
  2640.         av_log(s, AV_LOG_ERROR, "Too many streams\n");
  2641.         return NULL;

libavformat/utils.c:2640:9: Skipping av_log(): empty list of specs
  2638. #if FF_API_MAX_STREAMS
  2639.     if (s->nb_streams >= MAX_STREAMS){
  2640.         av_log(s, AV_LOG_ERROR, "Too many streams\n");
                ^
  2641.         return NULL;
  2642.     }

libavformat/utils.c:2641:9: 
  2639.     if (s->nb_streams >= MAX_STREAMS){
  2640.         av_log(s, AV_LOG_ERROR, "Too many streams\n");
  2641.         return NULL;
                ^
  2642.     }
  2643. #else

libavformat/utils.c:2690:1: return from a call to av_new_stream
  2688.     s->streams[s->nb_streams++] = st;
  2689.     return st;
  2690. }
        ^
  2691. 
  2692. AVProgram *av_new_program(AVFormatContext *ac, int id)

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

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

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

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

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