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

ffmpeg.c:3584:1: start of procedure new_subtitle_stream()
3582. }
3583. 
3584. static void new_subtitle_stream(AVFormatContext *oc, int file_idx)
      ^
3585. {
3586.     AVStream *st;

ffmpeg.c:3588:5: 
3586.     AVStream *st;
3587.     AVOutputStream *ost;
3588.     AVCodec *codec=NULL;
          ^
3589.     AVCodecContext *subtitle_enc;
3590.     enum CodecID codec_id = CODEC_ID_NONE;

ffmpeg.c:3590:5: 
3588.     AVCodec *codec=NULL;
3589.     AVCodecContext *subtitle_enc;
3590.     enum CodecID codec_id = CODEC_ID_NONE;
          ^
3591. 
3592.     st = av_new_stream(oc, oc->nb_streams < nb_streamid_map ? streamid_map[oc->nb_streams] : 0);

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

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

libavformat/utils.c:2627:1: start of procedure av_new_stream()
  2625. }
  2626. 
  2627. AVStream *av_new_stream(AVFormatContext *s, int id)
        ^
  2628. {
  2629.     AVStream *st;

libavformat/utils.c:2633:9: Taking true branch
  2631. 
  2632. #if FF_API_MAX_STREAMS
  2633.     if (s->nb_streams >= MAX_STREAMS){
                ^
  2634.         av_log(s, AV_LOG_ERROR, "Too many streams\n");
  2635.         return NULL;

libavformat/utils.c:2634:9: Skipping av_log(): empty list of specs
  2632. #if FF_API_MAX_STREAMS
  2633.     if (s->nb_streams >= MAX_STREAMS){
  2634.         av_log(s, AV_LOG_ERROR, "Too many streams\n");
                ^
  2635.         return NULL;
  2636.     }

libavformat/utils.c:2635:9: 
  2633.     if (s->nb_streams >= MAX_STREAMS){
  2634.         av_log(s, AV_LOG_ERROR, "Too many streams\n");
  2635.         return NULL;
                ^
  2636.     }
  2637. #else

libavformat/utils.c:2684:1: return from a call to av_new_stream
  2682.     s->streams[s->nb_streams++] = st;
  2683.     return st;
  2684. }
        ^
  2685. 
  2686. AVProgram *av_new_program(AVFormatContext *ac, int id)

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

ffmpeg.c:3594:9: 
3592.     st = av_new_stream(oc, oc->nb_streams < nb_streamid_map ? streamid_map[oc->nb_streams] : 0);
3593.     if (!st) {
3594.         fprintf(stderr, "Could not alloc stream\n");
              ^
3595.         ffmpeg_exit(1);
3596.     }

ffmpeg.c:3595:9: Skipping ffmpeg_exit(): empty list of specs
3593.     if (!st) {
3594.         fprintf(stderr, "Could not alloc stream\n");
3595.         ffmpeg_exit(1);
              ^
3596.     }
3597.     ost = new_output_stream(oc, file_idx);

ffmpeg.c:3597:5: Skipping new_output_stream(): empty list of specs
3595.         ffmpeg_exit(1);
3596.     }
3597.     ost = new_output_stream(oc, file_idx);
          ^
3598.     subtitle_enc = st->codec;
3599.     output_codecs = grow_array(output_codecs, sizeof(*output_codecs), &nb_output_codecs, nb_output_codecs + 1);

ffmpeg.c:3598:5: 
3596.     }
3597.     ost = new_output_stream(oc, file_idx);
3598.     subtitle_enc = st->codec;
          ^
3599.     output_codecs = grow_array(output_codecs, sizeof(*output_codecs), &nb_output_codecs, nb_output_codecs + 1);
3600.     if(!subtitle_stream_copy){
