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

ffmpeg.c:3603:1: start of procedure new_subtitle_stream()
3601. }
3602. 
3603. static void new_subtitle_stream(AVFormatContext *oc, int file_idx)
      ^
3604. {
3605.     AVStream *st;

ffmpeg.c:3607:5: 
3605.     AVStream *st;
3606.     AVOutputStream *ost;
3607.     AVCodec *codec=NULL;
          ^
3608.     AVCodecContext *subtitle_enc;
3609.     enum CodecID codec_id = CODEC_ID_NONE;

ffmpeg.c:3609:5: 
3607.     AVCodec *codec=NULL;
3608.     AVCodecContext *subtitle_enc;
3609.     enum CodecID codec_id = CODEC_ID_NONE;
          ^
3610. 
3611.     st = av_new_stream(oc, oc->nb_streams < nb_streamid_map ? streamid_map[oc->nb_streams] : 0);

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

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

libavformat/utils.c:2616:1: start of procedure av_new_stream()
  2614. }
  2615. 
  2616. AVStream *av_new_stream(AVFormatContext *s, int id)
        ^
  2617. {
  2618.     AVStream *st;

libavformat/utils.c:2622:9: Taking true branch
  2620. 
  2621. #if FF_API_MAX_STREAMS
  2622.     if (s->nb_streams >= MAX_STREAMS){
                ^
  2623.         av_log(s, AV_LOG_ERROR, "Too many streams\n");
  2624.         return NULL;

libavformat/utils.c:2623:9: Skipping av_log(): empty list of specs
  2621. #if FF_API_MAX_STREAMS
  2622.     if (s->nb_streams >= MAX_STREAMS){
  2623.         av_log(s, AV_LOG_ERROR, "Too many streams\n");
                ^
  2624.         return NULL;
  2625.     }

libavformat/utils.c:2624:9: 
  2622.     if (s->nb_streams >= MAX_STREAMS){
  2623.         av_log(s, AV_LOG_ERROR, "Too many streams\n");
  2624.         return NULL;
                ^
  2625.     }
  2626. #else

libavformat/utils.c:2673:1: return from a call to av_new_stream
  2671.     s->streams[s->nb_streams++] = st;
  2672.     return st;
  2673. }
        ^
  2674. 
  2675. AVProgram *av_new_program(AVFormatContext *ac, int id)

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

ffmpeg.c:3613:9: 
3611.     st = av_new_stream(oc, oc->nb_streams < nb_streamid_map ? streamid_map[oc->nb_streams] : 0);
3612.     if (!st) {
3613.         fprintf(stderr, "Could not alloc stream\n");
              ^
3614.         ffmpeg_exit(1);
3615.     }

ffmpeg.c:3614:9: Skipping ffmpeg_exit(): empty list of specs
3612.     if (!st) {
3613.         fprintf(stderr, "Could not alloc stream\n");
3614.         ffmpeg_exit(1);
              ^
3615.     }
3616.     ost = new_output_stream(oc, file_idx);

ffmpeg.c:3616:5: Skipping new_output_stream(): empty list of specs
3614.         ffmpeg_exit(1);
3615.     }
3616.     ost = new_output_stream(oc, file_idx);
          ^
3617.     subtitle_enc = st->codec;
3618.     output_codecs = grow_array(output_codecs, sizeof(*output_codecs), &nb_output_codecs, nb_output_codecs + 1);

ffmpeg.c:3617:5: 
3615.     }
3616.     ost = new_output_stream(oc, file_idx);
3617.     subtitle_enc = st->codec;
          ^
3618.     output_codecs = grow_array(output_codecs, sizeof(*output_codecs), &nb_output_codecs, nb_output_codecs + 1);
3619.     if(!subtitle_stream_copy){
