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

ffmpeg.c:3260:1: start of procedure opt_output_file()
3258. }
3259. 
3260. static void opt_output_file(const char *filename)
      ^
3261. {
3262.     AVFormatContext *oc;

ffmpeg.c:3265:5: 
3263.     int use_video, use_audio, use_subtitle;
3264.     int input_has_video, input_has_audio, input_has_subtitle;
3265.     AVFormatParameters params, *ap = &params;
          ^
3266. 
3267.     if (!strcmp(filename, "-"))

ffmpeg.c:3267:10: Taking false branch
3265.     AVFormatParameters params, *ap = &params;
3266. 
3267.     if (!strcmp(filename, "-"))
               ^
3268.         filename = "pipe:";
3269. 

ffmpeg.c:3270:5: 
3268.         filename = "pipe:";
3269. 
3270.     oc = avformat_alloc_context();
          ^
3271. 
3272.     if (!file_oformat) {

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

libavformat/options.c:78:5: 
  76. {
  77.     AVFormatContext *ic;
  78.     ic = av_malloc(sizeof(AVFormatContext));
          ^
  79.     if (!ic) return ic;
  80.     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:5: Skipping posix_memalign(): method has no implementation
    64.     ((char*)ptr)[-1]= diff;
    65. #elif HAVE_POSIX_MEMALIGN
    66.     posix_memalign(&ptr,16,size);
            ^
    67. #elif HAVE_MEMALIGN
    68.     ptr = memalign(16,size);

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

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

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

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

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

ffmpeg.c:3272:10: Taking true branch
3270.     oc = avformat_alloc_context();
3271. 
3272.     if (!file_oformat) {
               ^
3273.         file_oformat = guess_format(NULL, filename, NULL);
3274.         if (!file_oformat) {

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

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

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

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

ffmpeg.c:3281:5: 
3279.     }
3280. 
3281.     oc->oformat = file_oformat;
          ^
3282.     av_strlcpy(oc->filename, filename, sizeof(oc->filename));
3283. 
