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

avconv.c:3521:1: start of procedure opt_output_file()
3519. }
3520. 
3521. static void opt_output_file(void *optctx, const char *filename)
      ^
3522. {
3523.     OptionsContext *o = optctx;

avconv.c:3523:5: 
3521. static void opt_output_file(void *optctx, const char *filename)
3522. {
3523.     OptionsContext *o = optctx;
          ^
3524.     AVFormatContext *oc;
3525.     int i, err;

avconv.c:3530:10: Taking true branch
3528.     InputStream  *ist;
3529. 
3530.     if (!strcmp(filename, "-"))
               ^
3531.         filename = "pipe:";
3532. 

avconv.c:3531:9: 
3529. 
3530.     if (!strcmp(filename, "-"))
3531.         filename = "pipe:";
              ^
3532. 
3533.     oc = avformat_alloc_context();

avconv.c:3533:5: 
3531.         filename = "pipe:";
3532. 
3533.     oc = avformat_alloc_context();
          ^
3534.     if (!oc) {
3535.         print_error(filename, AVERROR(ENOMEM));

libavformat/options.c:141:1: start of procedure avformat_alloc_context()
  139. }
  140. 
  141. AVFormatContext *avformat_alloc_context(void)
       ^
  142. {
  143.     AVFormatContext *ic;

libavformat/options.c:144:5: 
  142. {
  143.     AVFormatContext *ic;
  144.     ic = av_malloc(sizeof(AVFormatContext));
           ^
  145.     if (!ic) return ic;
  146.     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:145:10: Taking true branch
  143.     AVFormatContext *ic;
  144.     ic = av_malloc(sizeof(AVFormatContext));
  145.     if (!ic) return ic;
                ^
  146.     avformat_get_context_defaults(ic);
  147.     return ic;

libavformat/options.c:145:14: 
  143.     AVFormatContext *ic;
  144.     ic = av_malloc(sizeof(AVFormatContext));
  145.     if (!ic) return ic;
                    ^
  146.     avformat_get_context_defaults(ic);
  147.     return ic;

libavformat/options.c:148:1: return from a call to avformat_alloc_context
  146.     avformat_get_context_defaults(ic);
  147.     return ic;
  148. }
       ^
  149. 
  150. const AVClass *avformat_get_class(void)

avconv.c:3534:10: Taking true branch
3532. 
3533.     oc = avformat_alloc_context();
3534.     if (!oc) {
               ^
3535.         print_error(filename, AVERROR(ENOMEM));
3536.         exit_program(1);

avconv.c:3535:9: 
3533.     oc = avformat_alloc_context();
3534.     if (!oc) {
3535.         print_error(filename, AVERROR(ENOMEM));
              ^
3536.         exit_program(1);
3537.     }

cmdutils.c:436:1: start of procedure print_error()
  434. }
  435. 
  436. void print_error(const char *filename, int err)
       ^
  437. {
  438.     char errbuf[128];

cmdutils.c:439:5: 
  437. {
  438.     char errbuf[128];
  439.     const char *errbuf_ptr = errbuf;
           ^
  440. 
  441.     if (av_strerror(err, errbuf, sizeof(errbuf)) < 0)

cmdutils.c:441:9: Taking true branch
  439.     const char *errbuf_ptr = errbuf;
  440. 
  441.     if (av_strerror(err, errbuf, sizeof(errbuf)) < 0)
               ^
  442.         errbuf_ptr = strerror(AVUNERROR(err));
  443.     av_log(NULL, AV_LOG_ERROR, "%s: %s\n", filename, errbuf_ptr);

cmdutils.c:442:9: Skipping strerror(): method has no implementation
  440. 
  441.     if (av_strerror(err, errbuf, sizeof(errbuf)) < 0)
  442.         errbuf_ptr = strerror(AVUNERROR(err));
               ^
  443.     av_log(NULL, AV_LOG_ERROR, "%s: %s\n", filename, errbuf_ptr);
  444. }

cmdutils.c:443:5: Skipping av_log(): empty list of specs
  441.     if (av_strerror(err, errbuf, sizeof(errbuf)) < 0)
  442.         errbuf_ptr = strerror(AVUNERROR(err));
  443.     av_log(NULL, AV_LOG_ERROR, "%s: %s\n", filename, errbuf_ptr);
           ^
  444. }
  445. 

cmdutils.c:444:1: return from a call to print_error
  442.         errbuf_ptr = strerror(AVUNERROR(err));
  443.     av_log(NULL, AV_LOG_ERROR, "%s: %s\n", filename, errbuf_ptr);
  444. }
       ^
  445. 
  446. static int warned_cfg = 0;

avconv.c:3536:9: Skipping exit_program(): empty list of specs
3534.     if (!oc) {
3535.         print_error(filename, AVERROR(ENOMEM));
3536.         exit_program(1);
              ^
3537.     }
3538. 

avconv.c:3539:9: Taking true branch
3537.     }
3538. 
3539.     if (o->format) {
              ^
3540.         file_oformat = av_guess_format(o->format, NULL, NULL);
3541.         if (!file_oformat) {

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

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

avconv.c:3554:5: 
3552.     }
3553. 
3554.     oc->oformat = file_oformat;
          ^
3555.     oc->interrupt_callback = int_cb;
3556.     av_strlcpy(oc->filename, filename, sizeof(oc->filename));
