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

ffmpeg.c:3545:1: start of procedure new_subtitle_stream()
3543. }
3544. 
3545. static void new_subtitle_stream(AVFormatContext *oc, int file_idx)
      ^
3546. {
3547.     AVStream *st;

ffmpeg.c:3549:5: 
3547.     AVStream *st;
3548.     AVOutputStream *ost;
3549.     AVCodec *codec=NULL;
          ^
3550.     AVCodecContext *subtitle_enc;
3551.     enum CodecID codec_id = CODEC_ID_NONE;

ffmpeg.c:3551:5: 
3549.     AVCodec *codec=NULL;
3550.     AVCodecContext *subtitle_enc;
3551.     enum CodecID codec_id = CODEC_ID_NONE;
          ^
3552. 
3553.     st = av_new_stream(oc, oc->nb_streams < nb_streamid_map ? streamid_map[oc->nb_streams] : 0);

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

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

libavformat/utils.c:2647:1: start of procedure av_new_stream()
  2645. }
  2646. 
  2647. AVStream *av_new_stream(AVFormatContext *s, int id)
        ^
  2648. {
  2649.     AVStream *st;

libavformat/utils.c:2653:9: Taking true branch
  2651. 
  2652. #if FF_API_MAX_STREAMS
  2653.     if (s->nb_streams >= MAX_STREAMS){
                ^
  2654.         av_log(s, AV_LOG_ERROR, "Too many streams\n");
  2655.         return NULL;

libavformat/utils.c:2654:9: Skipping av_log(): empty list of specs
  2652. #if FF_API_MAX_STREAMS
  2653.     if (s->nb_streams >= MAX_STREAMS){
  2654.         av_log(s, AV_LOG_ERROR, "Too many streams\n");
                ^
  2655.         return NULL;
  2656.     }

libavformat/utils.c:2655:9: 
  2653.     if (s->nb_streams >= MAX_STREAMS){
  2654.         av_log(s, AV_LOG_ERROR, "Too many streams\n");
  2655.         return NULL;
                ^
  2656.     }
  2657. #else

libavformat/utils.c:2704:1: return from a call to av_new_stream
  2702.     s->streams[s->nb_streams++] = st;
  2703.     return st;
  2704. }
        ^
  2705. 
  2706. AVProgram *av_new_program(AVFormatContext *ac, int id)

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

ffmpeg.c:3555:9: 
3553.     st = av_new_stream(oc, oc->nb_streams < nb_streamid_map ? streamid_map[oc->nb_streams] : 0);
3554.     if (!st) {
3555.         fprintf(stderr, "Could not alloc stream\n");
              ^
3556.         ffmpeg_exit(1);
3557.     }

ffmpeg.c:3556:9: Skipping ffmpeg_exit(): empty list of specs
3554.     if (!st) {
3555.         fprintf(stderr, "Could not alloc stream\n");
3556.         ffmpeg_exit(1);
              ^
3557.     }
3558.     ost = new_output_stream(oc, file_idx);

ffmpeg.c:3558:5: Skipping new_output_stream(): empty list of specs
3556.         ffmpeg_exit(1);
3557.     }
3558.     ost = new_output_stream(oc, file_idx);
          ^
3559.     subtitle_enc = st->codec;
3560.     output_codecs = grow_array(output_codecs, sizeof(*output_codecs), &nb_output_codecs, nb_output_codecs + 1);

ffmpeg.c:3559:5: 
3557.     }
3558.     ost = new_output_stream(oc, file_idx);
3559.     subtitle_enc = st->codec;
          ^
3560.     output_codecs = grow_array(output_codecs, sizeof(*output_codecs), &nb_output_codecs, nb_output_codecs + 1);
3561.     if(!subtitle_stream_copy){
