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

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

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

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

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

libavformat/utils.c:2511:1: start of procedure av_new_stream()
  2509. }
  2510. 
  2511. AVStream *av_new_stream(AVFormatContext *s, int id)
        ^
  2512. {
  2513.     AVStream *st;

libavformat/utils.c:2517:9: Taking true branch
  2515. 
  2516. #if FF_API_MAX_STREAMS
  2517.     if (s->nb_streams >= MAX_STREAMS){
                ^
  2518.         av_log(s, AV_LOG_ERROR, "Too many streams\n");
  2519.         return NULL;

libavformat/utils.c:2518:9: Skipping av_log(): empty list of specs
  2516. #if FF_API_MAX_STREAMS
  2517.     if (s->nb_streams >= MAX_STREAMS){
  2518.         av_log(s, AV_LOG_ERROR, "Too many streams\n");
                ^
  2519.         return NULL;
  2520.     }

libavformat/utils.c:2519:9: 
  2517.     if (s->nb_streams >= MAX_STREAMS){
  2518.         av_log(s, AV_LOG_ERROR, "Too many streams\n");
  2519.         return NULL;
                ^
  2520.     }
  2521. #else

libavformat/utils.c:2568:1: return from a call to av_new_stream
  2566.     s->streams[s->nb_streams++] = st;
  2567.     return st;
  2568. }
        ^
  2569. 
  2570. AVProgram *av_new_program(AVFormatContext *ac, int id)

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

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

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

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