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

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

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

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

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

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

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

libavformat/utils.c:2641:9: Taking true branch
  2639.     AVStream **streams;
  2640. 
  2641.     if (s->nb_streams >= INT_MAX/sizeof(*streams))
                ^
  2642.         return NULL;
  2643.     streams = av_realloc(s->streams, (s->nb_streams + 1) * sizeof(*streams));

libavformat/utils.c:2642:9: 
  2640. 
  2641.     if (s->nb_streams >= INT_MAX/sizeof(*streams))
  2642.         return NULL;
                ^
  2643.     streams = av_realloc(s->streams, (s->nb_streams + 1) * sizeof(*streams));
  2644.     if (!streams)

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

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

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

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

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