ffmpeg.c:3285: error: Null Dereference
  pointer `oc` last assigned on line 3274 could be null and is dereferenced at line 3285, column 5.

ffmpeg.c:3264:1: start of procedure opt_output_file()
3262. }
3263. 
3264. static void opt_output_file(const char *filename)
      ^
3265. {
3266.     AVFormatContext *oc;

ffmpeg.c:3269:5: 
3267.     int use_video, use_audio, use_subtitle;
3268.     int input_has_video, input_has_audio, input_has_subtitle;
3269.     AVFormatParameters params, *ap = &params;
          ^
3270. 
3271.     if (!strcmp(filename, "-"))

ffmpeg.c:3271:10: Taking false branch
3269.     AVFormatParameters params, *ap = &params;
3270. 
3271.     if (!strcmp(filename, "-"))
               ^
3272.         filename = "pipe:";
3273. 

ffmpeg.c:3274:5: 
3272.         filename = "pipe:";
3273. 
3274.     oc = avformat_alloc_context();
          ^
3275. 
3276.     if (!file_oformat) {

libavformat/options.c:77:1: start of procedure avformat_alloc_context()
  75. }
  76. 
  77. AVFormatContext *avformat_alloc_context(void)
      ^
  78. {
  79.     AVFormatContext *ic;

libavformat/options.c:80:5: 
  78. {
  79.     AVFormatContext *ic;
  80.     ic = av_malloc(sizeof(AVFormatContext));
          ^
  81.     if (!ic) return ic;
  82.     avformat_get_context_defaults(ic);

libavutil/mem.c:47:1: start of procedure av_malloc()
    45.    linker will do it automatically. */
    46. 
    47. void *av_malloc(unsigned int size)
        ^
    48. {
    49.     void *ptr = NULL;

libavutil/mem.c:49:5: 
    47. void *av_malloc(unsigned int size)
    48. {
    49.     void *ptr = NULL;
            ^
    50. #if CONFIG_MEMALIGN_HACK
    51.     long diff;

libavutil/mem.c:55:8: Taking false branch
    53. 
    54.     /* let's disallow possible ambiguous cases */
    55.     if(size > (INT_MAX-16) )
               ^
    56.         return NULL;
    57. 

libavutil/mem.c:66:9: Taking false branch
    64.     ((char*)ptr)[-1]= diff;
    65. #elif HAVE_POSIX_MEMALIGN
    66.     if (posix_memalign(&ptr,16,size))
                ^
    67.         ptr = NULL;
    68. #elif HAVE_MEMALIGN

libavutil/mem.c:99:5: 
     97.     ptr = malloc(size);
     98. #endif
     99.     return ptr;
             ^
    100. }
    101. 

libavutil/mem.c:100:1: return from a call to av_malloc
     98. #endif
     99.     return ptr;
    100. }
         ^
    101. 
    102. void *av_realloc(void *ptr, unsigned int size)

libavformat/options.c:81:10: Taking true branch
  79.     AVFormatContext *ic;
  80.     ic = av_malloc(sizeof(AVFormatContext));
  81.     if (!ic) return ic;
               ^
  82.     avformat_get_context_defaults(ic);
  83.     ic->av_class = &av_format_context_class;

libavformat/options.c:81:14: 
  79.     AVFormatContext *ic;
  80.     ic = av_malloc(sizeof(AVFormatContext));
  81.     if (!ic) return ic;
                   ^
  82.     avformat_get_context_defaults(ic);
  83.     ic->av_class = &av_format_context_class;

libavformat/options.c:85:1: return from a call to avformat_alloc_context
  83.     ic->av_class = &av_format_context_class;
  84.     return ic;
  85. }
      ^
  86. 
  87. #if LIBAVFORMAT_VERSION_MAJOR < 53

ffmpeg.c:3276:10: Taking true branch
3274.     oc = avformat_alloc_context();
3275. 
3276.     if (!file_oformat) {
               ^
3277.         file_oformat = guess_format(NULL, filename, NULL);
3278.         if (!file_oformat) {

ffmpeg.c:3277:9: Skipping guess_format(): empty list of specs
3275. 
3276.     if (!file_oformat) {
3277.         file_oformat = guess_format(NULL, filename, NULL);
              ^
3278.         if (!file_oformat) {
3279.             fprintf(stderr, "Unable to find a suitable output format for '%s'\n",

ffmpeg.c:3278:14: Taking true branch
3276.     if (!file_oformat) {
3277.         file_oformat = guess_format(NULL, filename, NULL);
3278.         if (!file_oformat) {
                   ^
3279.             fprintf(stderr, "Unable to find a suitable output format for '%s'\n",
3280.                     filename);

ffmpeg.c:3279:13: 
3277.         file_oformat = guess_format(NULL, filename, NULL);
3278.         if (!file_oformat) {
3279.             fprintf(stderr, "Unable to find a suitable output format for '%s'\n",
                  ^
3280.                     filename);
3281.             av_exit(1);

ffmpeg.c:3281:13: Skipping av_exit(): empty list of specs
3279.             fprintf(stderr, "Unable to find a suitable output format for '%s'\n",
3280.                     filename);
3281.             av_exit(1);
                  ^
3282.         }
3283.     }

ffmpeg.c:3285:5: 
3283.     }
3284. 
3285.     oc->oformat = file_oformat;
          ^
3286.     av_strlcpy(oc->filename, filename, sizeof(oc->filename));
3287. 
