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

ffmpeg.c:3675:1: start of procedure new_subtitle_stream()
3673. }
3674. 
3675. static void new_subtitle_stream(AVFormatContext *oc, int file_idx)
      ^
3676. {
3677.     AVStream *st;

ffmpeg.c:3679:5: 
3677.     AVStream *st;
3678.     AVOutputStream *ost;
3679.     AVCodec *codec=NULL;
          ^
3680.     AVCodecContext *subtitle_enc;
3681.     enum CodecID codec_id = CODEC_ID_NONE;

ffmpeg.c:3681:5: 
3679.     AVCodec *codec=NULL;
3680.     AVCodecContext *subtitle_enc;
3681.     enum CodecID codec_id = CODEC_ID_NONE;
          ^
3682. 
3683.     st = av_new_stream(oc, oc->nb_streams < nb_streamid_map ? streamid_map[oc->nb_streams] : 0);

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

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

libavformat/utils.c:2642:1: start of procedure av_new_stream()
  2640. }
  2641. 
  2642. AVStream *av_new_stream(AVFormatContext *s, int id)
        ^
  2643. {
  2644.     AVStream *st;

libavformat/utils.c:2648:9: Taking true branch
  2646.     AVStream **streams;
  2647. 
  2648.     if (s->nb_streams >= INT_MAX/sizeof(*streams))
                ^
  2649.         return NULL;
  2650.     streams = av_realloc(s->streams, (s->nb_streams + 1) * sizeof(*streams));

libavformat/utils.c:2649:9: 
  2647. 
  2648.     if (s->nb_streams >= INT_MAX/sizeof(*streams))
  2649.         return NULL;
                ^
  2650.     streams = av_realloc(s->streams, (s->nb_streams + 1) * sizeof(*streams));
  2651.     if (!streams)

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

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

ffmpeg.c:3685:9: 
3683.     st = av_new_stream(oc, oc->nb_streams < nb_streamid_map ? streamid_map[oc->nb_streams] : 0);
3684.     if (!st) {
3685.         fprintf(stderr, "Could not alloc stream\n");
              ^
3686.         ffmpeg_exit(1);
3687.     }

ffmpeg.c:3686:9: Skipping ffmpeg_exit(): empty list of specs
3684.     if (!st) {
3685.         fprintf(stderr, "Could not alloc stream\n");
3686.         ffmpeg_exit(1);
              ^
3687.     }
3688.     ost = new_output_stream(oc, file_idx);

ffmpeg.c:3688:5: Skipping new_output_stream(): empty list of specs
3686.         ffmpeg_exit(1);
3687.     }
3688.     ost = new_output_stream(oc, file_idx);
          ^
3689.     subtitle_enc = st->codec;
3690.     if(!subtitle_stream_copy){

ffmpeg.c:3689:5: 
3687.     }
3688.     ost = new_output_stream(oc, file_idx);
3689.     subtitle_enc = st->codec;
          ^
3690.     if(!subtitle_stream_copy){
3691.         if (subtitle_codec_name) {
