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

ffmpeg.c:3599:1: start of procedure new_subtitle_stream()
3597. }
3598. 
3599. static void new_subtitle_stream(AVFormatContext *oc, int file_idx)
      ^
3600. {
3601.     AVStream *st;

ffmpeg.c:3603:5: 
3601.     AVStream *st;
3602.     AVOutputStream *ost;
3603.     AVCodec *codec=NULL;
          ^
3604.     AVCodecContext *subtitle_enc;
3605.     enum CodecID codec_id = CODEC_ID_NONE;

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

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

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

libavformat/utils.c:2601:1: start of procedure av_new_stream()
  2599. }
  2600. 
  2601. AVStream *av_new_stream(AVFormatContext *s, int id)
        ^
  2602. {
  2603.     AVStream *st;

libavformat/utils.c:2607:9: Taking true branch
  2605. 
  2606. #if FF_API_MAX_STREAMS
  2607.     if (s->nb_streams >= MAX_STREAMS){
                ^
  2608.         av_log(s, AV_LOG_ERROR, "Too many streams\n");
  2609.         return NULL;

libavformat/utils.c:2608:9: Skipping av_log(): empty list of specs
  2606. #if FF_API_MAX_STREAMS
  2607.     if (s->nb_streams >= MAX_STREAMS){
  2608.         av_log(s, AV_LOG_ERROR, "Too many streams\n");
                ^
  2609.         return NULL;
  2610.     }

libavformat/utils.c:2609:9: 
  2607.     if (s->nb_streams >= MAX_STREAMS){
  2608.         av_log(s, AV_LOG_ERROR, "Too many streams\n");
  2609.         return NULL;
                ^
  2610.     }
  2611. #else

libavformat/utils.c:2658:1: return from a call to av_new_stream
  2656.     s->streams[s->nb_streams++] = st;
  2657.     return st;
  2658. }
        ^
  2659. 
  2660. AVProgram *av_new_program(AVFormatContext *ac, int id)

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

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

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

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

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