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

ffmpeg.c:3589:1: start of procedure new_subtitle_stream()
3587. }
3588. 
3589. static void new_subtitle_stream(AVFormatContext *oc, int file_idx)
      ^
3590. {
3591.     AVStream *st;

ffmpeg.c:3593:5: 
3591.     AVStream *st;
3592.     AVOutputStream *ost;
3593.     AVCodec *codec=NULL;
          ^
3594.     AVCodecContext *subtitle_enc;
3595.     enum CodecID codec_id = CODEC_ID_NONE;

ffmpeg.c:3595:5: 
3593.     AVCodec *codec=NULL;
3594.     AVCodecContext *subtitle_enc;
3595.     enum CodecID codec_id = CODEC_ID_NONE;
          ^
3596. 
3597.     st = av_new_stream(oc, oc->nb_streams < nb_streamid_map ? streamid_map[oc->nb_streams] : 0);

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

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

libavformat/utils.c:2621:1: start of procedure av_new_stream()
  2619. }
  2620. 
  2621. AVStream *av_new_stream(AVFormatContext *s, int id)
        ^
  2622. {
  2623.     AVStream *st;

libavformat/utils.c:2627:9: Taking true branch
  2625. 
  2626. #if FF_API_MAX_STREAMS
  2627.     if (s->nb_streams >= MAX_STREAMS){
                ^
  2628.         av_log(s, AV_LOG_ERROR, "Too many streams\n");
  2629.         return NULL;

libavformat/utils.c:2628:9: Skipping av_log(): empty list of specs
  2626. #if FF_API_MAX_STREAMS
  2627.     if (s->nb_streams >= MAX_STREAMS){
  2628.         av_log(s, AV_LOG_ERROR, "Too many streams\n");
                ^
  2629.         return NULL;
  2630.     }

libavformat/utils.c:2629:9: 
  2627.     if (s->nb_streams >= MAX_STREAMS){
  2628.         av_log(s, AV_LOG_ERROR, "Too many streams\n");
  2629.         return NULL;
                ^
  2630.     }
  2631. #else

libavformat/utils.c:2678:1: return from a call to av_new_stream
  2676.     s->streams[s->nb_streams++] = st;
  2677.     return st;
  2678. }
        ^
  2679. 
  2680. AVProgram *av_new_program(AVFormatContext *ac, int id)

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

ffmpeg.c:3599:9: 
3597.     st = av_new_stream(oc, oc->nb_streams < nb_streamid_map ? streamid_map[oc->nb_streams] : 0);
3598.     if (!st) {
3599.         fprintf(stderr, "Could not alloc stream\n");
              ^
3600.         ffmpeg_exit(1);
3601.     }

ffmpeg.c:3600:9: Skipping ffmpeg_exit(): empty list of specs
3598.     if (!st) {
3599.         fprintf(stderr, "Could not alloc stream\n");
3600.         ffmpeg_exit(1);
              ^
3601.     }
3602.     ost = new_output_stream(oc, file_idx);

ffmpeg.c:3602:5: Skipping new_output_stream(): empty list of specs
3600.         ffmpeg_exit(1);
3601.     }
3602.     ost = new_output_stream(oc, file_idx);
          ^
3603.     subtitle_enc = st->codec;
3604.     output_codecs = grow_array(output_codecs, sizeof(*output_codecs), &nb_output_codecs, nb_output_codecs + 1);

ffmpeg.c:3603:5: 
3601.     }
3602.     ost = new_output_stream(oc, file_idx);
3603.     subtitle_enc = st->codec;
          ^
3604.     output_codecs = grow_array(output_codecs, sizeof(*output_codecs), &nb_output_codecs, nb_output_codecs + 1);
3605.     if(!subtitle_stream_copy){
