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

ffmpeg.c:3609:1: start of procedure new_subtitle_stream()
3607. }
3608. 
3609. static void new_subtitle_stream(AVFormatContext *oc)
      ^
3610. {
3611.     AVStream *st;

ffmpeg.c:3612:5: 
3610. {
3611.     AVStream *st;
3612.     AVCodec *codec=NULL;
          ^
3613.     AVCodecContext *subtitle_enc;
3614. 

ffmpeg.c:3615:28: Condition is true
3613.     AVCodecContext *subtitle_enc;
3614. 
3615.     st = av_new_stream(oc, oc->nb_streams < nb_streamid_map ? streamid_map[oc->nb_streams] : 0);
                                 ^
3616.     if (!st) {
3617.         fprintf(stderr, "Could not alloc stream\n");

ffmpeg.c:3615:5: 
3613.     AVCodecContext *subtitle_enc;
3614. 
3615.     st = av_new_stream(oc, oc->nb_streams < nb_streamid_map ? streamid_map[oc->nb_streams] : 0);
          ^
3616.     if (!st) {
3617.         fprintf(stderr, "Could not alloc stream\n");

libavformat/utils.c:2494:1: start of procedure av_new_stream()
  2492. }
  2493. 
  2494. AVStream *av_new_stream(AVFormatContext *s, int id)
        ^
  2495. {
  2496.     AVStream *st;

libavformat/utils.c:2499:9: Taking true branch
  2497.     int i;
  2498. 
  2499.     if (s->nb_streams >= MAX_STREAMS){
                ^
  2500.         av_log(s, AV_LOG_ERROR, "Too many streams\n");
  2501.         return NULL;

libavformat/utils.c:2500:9: Skipping av_log(): empty list of specs
  2498. 
  2499.     if (s->nb_streams >= MAX_STREAMS){
  2500.         av_log(s, AV_LOG_ERROR, "Too many streams\n");
                ^
  2501.         return NULL;
  2502.     }

libavformat/utils.c:2501:9: 
  2499.     if (s->nb_streams >= MAX_STREAMS){
  2500.         av_log(s, AV_LOG_ERROR, "Too many streams\n");
  2501.         return NULL;
                ^
  2502.     }
  2503. 

libavformat/utils.c:2536:1: return from a call to av_new_stream
  2534.     s->streams[s->nb_streams++] = st;
  2535.     return st;
  2536. }
        ^
  2537. 
  2538. AVProgram *av_new_program(AVFormatContext *ac, int id)

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

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

ffmpeg.c:3618:9: Skipping ffmpeg_exit(): empty list of specs
3616.     if (!st) {
3617.         fprintf(stderr, "Could not alloc stream\n");
3618.         ffmpeg_exit(1);
              ^
3619.     }
3620.     subtitle_enc = st->codec;

ffmpeg.c:3620:5: 
3618.         ffmpeg_exit(1);
3619.     }
3620.     subtitle_enc = st->codec;
          ^
3621.     output_codecs = grow_array(output_codecs, sizeof(*output_codecs), &nb_output_codecs, nb_output_codecs + 1);
3622.     if(!subtitle_stream_copy){
