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

ffmpeg.c:3617:1: start of procedure new_subtitle_stream()
3615. }
3616. 
3617. static void new_subtitle_stream(AVFormatContext *oc)
      ^
3618. {
3619.     AVStream *st;

ffmpeg.c:3620:5: 
3618. {
3619.     AVStream *st;
3620.     AVCodec *codec=NULL;
          ^
3621.     AVCodecContext *subtitle_enc;
3622. 

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

ffmpeg.c:3623:5: 
3621.     AVCodecContext *subtitle_enc;
3622. 
3623.     st = av_new_stream(oc, oc->nb_streams < nb_streamid_map ? streamid_map[oc->nb_streams] : 0);
          ^
3624.     if (!st) {
3625.         fprintf(stderr, "Could not alloc stream\n");

libavformat/utils.c:2542:1: start of procedure av_new_stream()
  2540. }
  2541. 
  2542. AVStream *av_new_stream(AVFormatContext *s, int id)
        ^
  2543. {
  2544.     AVStream *st;

libavformat/utils.c:2548:9: Taking true branch
  2546. 
  2547. #if FF_API_MAX_STREAMS
  2548.     if (s->nb_streams >= MAX_STREAMS){
                ^
  2549.         av_log(s, AV_LOG_ERROR, "Too many streams\n");
  2550.         return NULL;

libavformat/utils.c:2549:9: Skipping av_log(): empty list of specs
  2547. #if FF_API_MAX_STREAMS
  2548.     if (s->nb_streams >= MAX_STREAMS){
  2549.         av_log(s, AV_LOG_ERROR, "Too many streams\n");
                ^
  2550.         return NULL;
  2551.     }

libavformat/utils.c:2550:9: 
  2548.     if (s->nb_streams >= MAX_STREAMS){
  2549.         av_log(s, AV_LOG_ERROR, "Too many streams\n");
  2550.         return NULL;
                ^
  2551.     }
  2552. #else

libavformat/utils.c:2595:1: return from a call to av_new_stream
  2593.     s->streams[s->nb_streams++] = st;
  2594.     return st;
  2595. }
        ^
  2596. 
  2597. AVProgram *av_new_program(AVFormatContext *ac, int id)

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

ffmpeg.c:3625:9: 
3623.     st = av_new_stream(oc, oc->nb_streams < nb_streamid_map ? streamid_map[oc->nb_streams] : 0);
3624.     if (!st) {
3625.         fprintf(stderr, "Could not alloc stream\n");
              ^
3626.         ffmpeg_exit(1);
3627.     }

ffmpeg.c:3626:9: Skipping ffmpeg_exit(): empty list of specs
3624.     if (!st) {
3625.         fprintf(stderr, "Could not alloc stream\n");
3626.         ffmpeg_exit(1);
              ^
3627.     }
3628.     subtitle_enc = st->codec;

ffmpeg.c:3628:5: 
3626.         ffmpeg_exit(1);
3627.     }
3628.     subtitle_enc = st->codec;
          ^
3629.     output_codecs = grow_array(output_codecs, sizeof(*output_codecs), &nb_output_codecs, nb_output_codecs + 1);
3630.     if(!subtitle_stream_copy){
