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

ffmpeg.c:3559:1: start of procedure new_subtitle_stream()
3557. }
3558. 
3559. static void new_subtitle_stream(AVFormatContext *oc, int file_idx)
      ^
3560. {
3561.     AVStream *st;

ffmpeg.c:3563:5: 
3561.     AVStream *st;
3562.     AVOutputStream *ost;
3563.     AVCodec *codec=NULL;
          ^
3564.     AVCodecContext *subtitle_enc;
3565.     enum CodecID codec_id = CODEC_ID_NONE;

ffmpeg.c:3565:5: 
3563.     AVCodec *codec=NULL;
3564.     AVCodecContext *subtitle_enc;
3565.     enum CodecID codec_id = CODEC_ID_NONE;
          ^
3566. 
3567.     st = av_new_stream(oc, oc->nb_streams < nb_streamid_map ? streamid_map[oc->nb_streams] : 0);

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

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

libavformat/utils.c:2579:1: start of procedure av_new_stream()
  2577. }
  2578. 
  2579. AVStream *av_new_stream(AVFormatContext *s, int id)
        ^
  2580. {
  2581.     AVStream *st;

libavformat/utils.c:2585:9: Taking true branch
  2583.     AVStream **streams;
  2584. 
  2585.     if (s->nb_streams >= INT_MAX/sizeof(*streams))
                ^
  2586.         return NULL;
  2587.     streams = av_realloc(s->streams, (s->nb_streams + 1) * sizeof(*streams));

libavformat/utils.c:2586:9: 
  2584. 
  2585.     if (s->nb_streams >= INT_MAX/sizeof(*streams))
  2586.         return NULL;
                ^
  2587.     streams = av_realloc(s->streams, (s->nb_streams + 1) * sizeof(*streams));
  2588.     if (!streams)

libavformat/utils.c:2628:1: return from a call to av_new_stream
  2626.     s->streams[s->nb_streams++] = st;
  2627.     return st;
  2628. }
        ^
  2629. 
  2630. AVProgram *av_new_program(AVFormatContext *ac, int id)

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

ffmpeg.c:3569:9: 
3567.     st = av_new_stream(oc, oc->nb_streams < nb_streamid_map ? streamid_map[oc->nb_streams] : 0);
3568.     if (!st) {
3569.         fprintf(stderr, "Could not alloc stream\n");
              ^
3570.         ffmpeg_exit(1);
3571.     }

ffmpeg.c:3570:9: Skipping ffmpeg_exit(): empty list of specs
3568.     if (!st) {
3569.         fprintf(stderr, "Could not alloc stream\n");
3570.         ffmpeg_exit(1);
              ^
3571.     }
3572.     ost = new_output_stream(oc, file_idx);

ffmpeg.c:3572:5: Skipping new_output_stream(): empty list of specs
3570.         ffmpeg_exit(1);
3571.     }
3572.     ost = new_output_stream(oc, file_idx);
          ^
3573.     subtitle_enc = st->codec;
3574.     output_codecs = grow_array(output_codecs, sizeof(*output_codecs), &nb_output_codecs, nb_output_codecs + 1);

ffmpeg.c:3573:5: 
3571.     }
3572.     ost = new_output_stream(oc, file_idx);
3573.     subtitle_enc = st->codec;
          ^
3574.     output_codecs = grow_array(output_codecs, sizeof(*output_codecs), &nb_output_codecs, nb_output_codecs + 1);
3575.     if(!subtitle_stream_copy){
