avconv.c:3839: error: Null Dereference
  pointer `oc` last assigned on line 3818 could be null and is dereferenced at line 3839, column 5.

avconv.c:3806:1: start of procedure opt_output_file()
3804. }
3805. 
3806. static void opt_output_file(void *optctx, const char *filename)
      ^
3807. {
3808.     OptionsContext *o = optctx;

avconv.c:3808:5: 
3806. static void opt_output_file(void *optctx, const char *filename)
3807. {
3808.     OptionsContext *o = optctx;
          ^
3809.     AVFormatContext *oc;
3810.     int i, err;

avconv.c:3815:10: Taking true branch
3813.     InputStream  *ist;
3814. 
3815.     if (!strcmp(filename, "-"))
               ^
3816.         filename = "pipe:";
3817. 

avconv.c:3816:9: 
3814. 
3815.     if (!strcmp(filename, "-"))
3816.         filename = "pipe:";
              ^
3817. 
3818.     oc = avformat_alloc_context();

avconv.c:3818:5: 
3816.         filename = "pipe:";
3817. 
3818.     oc = avformat_alloc_context();
          ^
3819.     if (!oc) {
3820.         print_error(filename, AVERROR(ENOMEM));

libavformat/options.c:146:1: start of procedure avformat_alloc_context()
  144. }
  145. 
  146. AVFormatContext *avformat_alloc_context(void)
       ^
  147. {
  148.     AVFormatContext *ic;

libavformat/options.c:149:5: 
  147. {
  148.     AVFormatContext *ic;
  149.     ic = av_malloc(sizeof(AVFormatContext));
           ^
  150.     if (!ic) return ic;
  151.     avformat_get_context_defaults(ic);

libavutil/mem.c:64:1: start of procedure av_malloc()
    62.    linker will do it automatically. */
    63. 
    64. void *av_malloc(size_t size)
        ^
    65. {
    66.     void *ptr = NULL;

libavutil/mem.c:66:5: 
    64. void *av_malloc(size_t size)
    65. {
    66.     void *ptr = NULL;
            ^
    67. #if CONFIG_MEMALIGN_HACK
    68.     long diff;

libavutil/mem.c:72:8: Taking false branch
    70. 
    71.     /* let's disallow possible ambiguous cases */
    72.     if(size > (INT_MAX-32) )
               ^
    73.         return NULL;
    74. 

libavutil/mem.c:83:9: Taking false branch
    81.     ((char*)ptr)[-1]= diff;
    82. #elif HAVE_POSIX_MEMALIGN
    83.     if (posix_memalign(&ptr,32,size))
                ^
    84.         ptr = NULL;
    85. #elif HAVE_MEMALIGN

libavutil/mem.c:114:5: 
    112.     ptr = malloc(size);
    113. #endif
    114.     return ptr;
             ^
    115. }
    116. 

libavutil/mem.c:115:1: return from a call to av_malloc
    113. #endif
    114.     return ptr;
    115. }
         ^
    116. 
    117. void *av_realloc(void *ptr, size_t size)

libavformat/options.c:150:10: Taking true branch
  148.     AVFormatContext *ic;
  149.     ic = av_malloc(sizeof(AVFormatContext));
  150.     if (!ic) return ic;
                ^
  151.     avformat_get_context_defaults(ic);
  152.     return ic;

libavformat/options.c:150:14: 
  148.     AVFormatContext *ic;
  149.     ic = av_malloc(sizeof(AVFormatContext));
  150.     if (!ic) return ic;
                    ^
  151.     avformat_get_context_defaults(ic);
  152.     return ic;

libavformat/options.c:153:1: return from a call to avformat_alloc_context
  151.     avformat_get_context_defaults(ic);
  152.     return ic;
  153. }
       ^
  154. 
  155. const AVClass *avformat_get_class(void)

avconv.c:3819:10: Taking true branch
3817. 
3818.     oc = avformat_alloc_context();
3819.     if (!oc) {
               ^
3820.         print_error(filename, AVERROR(ENOMEM));
3821.         exit_program(1);

avconv.c:3820:9: 
3818.     oc = avformat_alloc_context();
3819.     if (!oc) {
3820.         print_error(filename, AVERROR(ENOMEM));
              ^
3821.         exit_program(1);
3822.     }

cmdutils.c:450:1: start of procedure print_error()
  448. }
  449. 
  450. void print_error(const char *filename, int err)
       ^
  451. {
  452.     char errbuf[128];

cmdutils.c:453:5: 
  451. {
  452.     char errbuf[128];
  453.     const char *errbuf_ptr = errbuf;
           ^
  454. 
  455.     if (av_strerror(err, errbuf, sizeof(errbuf)) < 0)

cmdutils.c:455:9: Taking true branch
  453.     const char *errbuf_ptr = errbuf;
  454. 
  455.     if (av_strerror(err, errbuf, sizeof(errbuf)) < 0)
               ^
  456.         errbuf_ptr = strerror(AVUNERROR(err));
  457.     av_log(NULL, AV_LOG_ERROR, "%s: %s\n", filename, errbuf_ptr);

cmdutils.c:456:9: Skipping strerror(): method has no implementation
  454. 
  455.     if (av_strerror(err, errbuf, sizeof(errbuf)) < 0)
  456.         errbuf_ptr = strerror(AVUNERROR(err));
               ^
  457.     av_log(NULL, AV_LOG_ERROR, "%s: %s\n", filename, errbuf_ptr);
  458. }

cmdutils.c:457:5: Skipping av_log(): empty list of specs
  455.     if (av_strerror(err, errbuf, sizeof(errbuf)) < 0)
  456.         errbuf_ptr = strerror(AVUNERROR(err));
  457.     av_log(NULL, AV_LOG_ERROR, "%s: %s\n", filename, errbuf_ptr);
           ^
  458. }
  459. 

cmdutils.c:458:1: return from a call to print_error
  456.         errbuf_ptr = strerror(AVUNERROR(err));
  457.     av_log(NULL, AV_LOG_ERROR, "%s: %s\n", filename, errbuf_ptr);
  458. }
       ^
  459. 
  460. static int warned_cfg = 0;

avconv.c:3821:9: Skipping exit_program(): empty list of specs
3819.     if (!oc) {
3820.         print_error(filename, AVERROR(ENOMEM));
3821.         exit_program(1);
              ^
3822.     }
3823. 

avconv.c:3824:9: Taking true branch
3822.     }
3823. 
3824.     if (o->format) {
              ^
3825.         file_oformat = av_guess_format(o->format, NULL, NULL);
3826.         if (!file_oformat) {

avconv.c:3825:9: Skipping av_guess_format(): empty list of specs
3823. 
3824.     if (o->format) {
3825.         file_oformat = av_guess_format(o->format, NULL, NULL);
              ^
3826.         if (!file_oformat) {
3827.             av_log(NULL, AV_LOG_FATAL, "Requested output format '%s' is not a suitable output format\n", o->format);

avconv.c:3826:14: Taking false branch
3824.     if (o->format) {
3825.         file_oformat = av_guess_format(o->format, NULL, NULL);
3826.         if (!file_oformat) {
                   ^
3827.             av_log(NULL, AV_LOG_FATAL, "Requested output format '%s' is not a suitable output format\n", o->format);
3828.             exit_program(1);

avconv.c:3839:5: 
3837.     }
3838. 
3839.     oc->oformat = file_oformat;
          ^
3840.     oc->interrupt_callback = int_cb;
3841.     av_strlcpy(oc->filename, filename, sizeof(oc->filename));
