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

ffmpeg.c:3566:1: start of procedure new_subtitle_stream()
3564. }
3565. 
3566. static void new_subtitle_stream(AVFormatContext *oc, int file_idx)
      ^
3567. {
3568.     AVStream *st;

ffmpeg.c:3570:5: 
3568.     AVStream *st;
3569.     AVOutputStream *ost;
3570.     AVCodec *codec=NULL;
          ^
3571.     AVCodecContext *subtitle_enc;
3572. 

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

ffmpeg.c:3573:5: 
3571.     AVCodecContext *subtitle_enc;
3572. 
3573.     st = av_new_stream(oc, oc->nb_streams < nb_streamid_map ? streamid_map[oc->nb_streams] : 0);
          ^
3574.     if (!st) {
3575.         fprintf(stderr, "Could not alloc stream\n");

libavformat/utils.c:2537:1: start of procedure av_new_stream()
  2535. }
  2536. 
  2537. AVStream *av_new_stream(AVFormatContext *s, int id)
        ^
  2538. {
  2539.     AVStream *st;

libavformat/utils.c:2543:9: Taking true branch
  2541. 
  2542. #if FF_API_MAX_STREAMS
  2543.     if (s->nb_streams >= MAX_STREAMS){
                ^
  2544.         av_log(s, AV_LOG_ERROR, "Too many streams\n");
  2545.         return NULL;

libavformat/utils.c:2544:9: Skipping av_log(): empty list of specs
  2542. #if FF_API_MAX_STREAMS
  2543.     if (s->nb_streams >= MAX_STREAMS){
  2544.         av_log(s, AV_LOG_ERROR, "Too many streams\n");
                ^
  2545.         return NULL;
  2546.     }

libavformat/utils.c:2545:9: 
  2543.     if (s->nb_streams >= MAX_STREAMS){
  2544.         av_log(s, AV_LOG_ERROR, "Too many streams\n");
  2545.         return NULL;
                ^
  2546.     }
  2547. #else

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

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

ffmpeg.c:3575:9: 
3573.     st = av_new_stream(oc, oc->nb_streams < nb_streamid_map ? streamid_map[oc->nb_streams] : 0);
3574.     if (!st) {
3575.         fprintf(stderr, "Could not alloc stream\n");
              ^
3576.         ffmpeg_exit(1);
3577.     }

ffmpeg.c:3576:9: Skipping ffmpeg_exit(): empty list of specs
3574.     if (!st) {
3575.         fprintf(stderr, "Could not alloc stream\n");
3576.         ffmpeg_exit(1);
              ^
3577.     }
3578.     ost = new_output_stream(oc, file_idx);

ffmpeg.c:3578:5: Skipping new_output_stream(): empty list of specs
3576.         ffmpeg_exit(1);
3577.     }
3578.     ost = new_output_stream(oc, file_idx);
          ^
3579.     subtitle_enc = st->codec;
3580.     output_codecs = grow_array(output_codecs, sizeof(*output_codecs), &nb_output_codecs, nb_output_codecs + 1);

ffmpeg.c:3579:5: 
3577.     }
3578.     ost = new_output_stream(oc, file_idx);
3579.     subtitle_enc = st->codec;
          ^
3580.     output_codecs = grow_array(output_codecs, sizeof(*output_codecs), &nb_output_codecs, nb_output_codecs + 1);
3581.     if(!subtitle_stream_copy){
