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

ffmpeg.c:3324:1: start of procedure opt_output_file()
3322. }
3323. 
3324. static void opt_output_file(const char *filename)
      ^
3325. {
3326.     AVFormatContext *oc;

ffmpeg.c:3329:5: 
3327.     int use_video, use_audio, use_subtitle;
3328.     int input_has_video, input_has_audio, input_has_subtitle;
3329.     AVFormatParameters params, *ap = &params;
          ^
3330. 
3331.     if (!strcmp(filename, "-"))

ffmpeg.c:3331:10: Taking false branch
3329.     AVFormatParameters params, *ap = &params;
3330. 
3331.     if (!strcmp(filename, "-"))
               ^
3332.         filename = "pipe:";
3333. 

ffmpeg.c:3334:5: 
3332.         filename = "pipe:";
3333. 
3334.     oc = avformat_alloc_context();
          ^
3335. 
3336.     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:3336:10: Taking true branch
3334.     oc = avformat_alloc_context();
3335. 
3336.     if (!file_oformat) {
               ^
3337.         file_oformat = guess_format(NULL, filename, NULL);
3338.         if (!file_oformat) {

ffmpeg.c:3337:9: Skipping guess_format(): empty list of specs
3335. 
3336.     if (!file_oformat) {
3337.         file_oformat = guess_format(NULL, filename, NULL);
              ^
3338.         if (!file_oformat) {
3339.             fprintf(stderr, "Unable to find a suitable output format for '%s'\n",

ffmpeg.c:3338:14: Taking true branch
3336.     if (!file_oformat) {
3337.         file_oformat = guess_format(NULL, filename, NULL);
3338.         if (!file_oformat) {
                   ^
3339.             fprintf(stderr, "Unable to find a suitable output format for '%s'\n",
3340.                     filename);

ffmpeg.c:3339:13: 
3337.         file_oformat = guess_format(NULL, filename, NULL);
3338.         if (!file_oformat) {
3339.             fprintf(stderr, "Unable to find a suitable output format for '%s'\n",
                  ^
3340.                     filename);
3341.             av_exit(1);

ffmpeg.c:3341:13: Skipping av_exit(): empty list of specs
3339.             fprintf(stderr, "Unable to find a suitable output format for '%s'\n",
3340.                     filename);
3341.             av_exit(1);
                  ^
3342.         }
3343.     }

ffmpeg.c:3345:5: 
3343.     }
3344. 
3345.     oc->oformat = file_oformat;
          ^
3346.     av_strlcpy(oc->filename, filename, sizeof(oc->filename));
3347. 
