ffserver.c:2004: error: Null Dereference
  pointer `s` last assigned on line 1999 could be null and is dereferenced at line 2004, column 5.

ffserver.c:1956:1: start of procedure open_input_stream()
1954. }
1955. 
1956. static int open_input_stream(HTTPContext *c, const char *info)
      ^
1957. {
1958.     char buf[128];

ffserver.c:1965:9: Taking true branch
1963. 
1964.     /* find file name */
1965.     if (c->stream->feed) {
              ^
1966.         strcpy(input_filename, c->stream->feed->feed_filename);
1967.         buf_size = FFM_PACKET_SIZE;

ffserver.c:1966:9: 
1964.     /* find file name */
1965.     if (c->stream->feed) {
1966.         strcpy(input_filename, c->stream->feed->feed_filename);
              ^
1967.         buf_size = FFM_PACKET_SIZE;
1968.         /* compute position (absolute time) */

ffserver.c:1967:9: 
1965.     if (c->stream->feed) {
1966.         strcpy(input_filename, c->stream->feed->feed_filename);
1967.         buf_size = FFM_PACKET_SIZE;
              ^
1968.         /* compute position (absolute time) */
1969.         if (find_info_tag(buf, sizeof(buf), "date", info)) {

ffserver.c:1969:13: Taking false branch
1967.         buf_size = FFM_PACKET_SIZE;
1968.         /* compute position (absolute time) */
1969.         if (find_info_tag(buf, sizeof(buf), "date", info)) {
                  ^
1970.             stream_pos = parse_date(buf, 0);
1971.             if (stream_pos == INT64_MIN)

ffserver.c:1973:20: Taking false branch
1971.             if (stream_pos == INT64_MIN)
1972.                 return -1;
1973.         } else if (find_info_tag(buf, sizeof(buf), "buffer", info)) {
                         ^
1974.             int prebuffer = strtol(buf, 0, 10);
1975.             stream_pos = av_gettime() - prebuffer * (int64_t)1000000;

ffserver.c:1977:13: Skipping av_gettime(): empty list of specs
1975.             stream_pos = av_gettime() - prebuffer * (int64_t)1000000;
1976.         } else
1977.             stream_pos = av_gettime() - c->stream->prebuffer * (int64_t)1000;
                  ^
1978.     } else {
1979.         strcpy(input_filename, c->stream->feed_filename);

ffserver.c:1989:9: Taking false branch
1987.             stream_pos = 0;
1988.     }
1989.     if (input_filename[0] == '\0')
              ^
1990.         return -1;
1991. 

ffserver.c:1999:9: 
1997. 
1998.     /* open stream */
1999.     if ((ret = av_open_input_file(&s, input_filename, c->stream->ifmt,
              ^
2000.                                   buf_size, c->stream->ap_in)) < 0) {
2001.         http_log("could not open %s: %d\n", input_filename, ret);

libavformat/utils.c:425:1: start of procedure av_open_input_file()
  423. #define PROBE_BUF_MAX (1<<20)
  424. 
  425. int av_open_input_file(AVFormatContext **ic_ptr, const char *filename,
       ^
  426.                        AVInputFormat *fmt,
  427.                        int buf_size,

libavformat/utils.c:431:5: 
  429. {
  430.     int err, probe_size;
  431.     AVProbeData probe_data, *pd = &probe_data;
           ^
  432.     ByteIOContext *pb = NULL;
  433. 

libavformat/utils.c:432:5: 
  430.     int err, probe_size;
  431.     AVProbeData probe_data, *pd = &probe_data;
  432.     ByteIOContext *pb = NULL;
           ^
  433. 
  434.     pd->filename = "";

libavformat/utils.c:434:5: 
  432.     ByteIOContext *pb = NULL;
  433. 
  434.     pd->filename = "";
           ^
  435.     if (filename)
  436.         pd->filename = filename;

libavformat/utils.c:435:9: Taking true branch
  433. 
  434.     pd->filename = "";
  435.     if (filename)
               ^
  436.         pd->filename = filename;
  437.     pd->buf = NULL;

libavformat/utils.c:436:9: 
  434.     pd->filename = "";
  435.     if (filename)
  436.         pd->filename = filename;
               ^
  437.     pd->buf = NULL;
  438.     pd->buf_size = 0;

libavformat/utils.c:437:5: 
  435.     if (filename)
  436.         pd->filename = filename;
  437.     pd->buf = NULL;
           ^
  438.     pd->buf_size = 0;
  439. 

libavformat/utils.c:438:5: 
  436.         pd->filename = filename;
  437.     pd->buf = NULL;
  438.     pd->buf_size = 0;
           ^
  439. 
  440.     if (!fmt) {

libavformat/utils.c:440:10: Taking false branch
  438.     pd->buf_size = 0;
  439. 
  440.     if (!fmt) {
                ^
  441.         /* guess format if no file can be opened */
  442.         fmt = av_probe_input_format(pd, 0);

libavformat/utils.c:447:10: Taking false branch
  445.     /* Do not open file if the format does not need it. XXX: specific
  446.        hack needed to handle RTSP/TCP */
  447.     if (!fmt || !(fmt->flags & AVFMT_NOFILE)) {
                ^
  448.         /* if no file needed do not try to open one */
  449.         if ((err=url_fopen(&pb, filename, URL_RDONLY)) < 0) {

libavformat/utils.c:447:19: Taking false branch
  445.     /* Do not open file if the format does not need it. XXX: specific
  446.        hack needed to handle RTSP/TCP */
  447.     if (!fmt || !(fmt->flags & AVFMT_NOFILE)) {
                         ^
  448.         /* if no file needed do not try to open one */
  449.         if ((err=url_fopen(&pb, filename, URL_RDONLY)) < 0) {

libavformat/utils.c:477:10: Taking false branch
  475. 
  476.     /* if still no format found, error */
  477.     if (!fmt) {
                ^
  478.         err = AVERROR_NOFMT;
  479.         goto fail;

libavformat/utils.c:483:9: Taking false branch
  481. 
  482.     /* check filename in case an image number is expected */
  483.     if (fmt->flags & AVFMT_NEEDNUMBER) {
               ^
  484.         if (!av_filename_number_test(filename)) {
  485.             err = AVERROR_NUMEXPECTED;

libavformat/utils.c:489:5: Skipping av_open_input_stream(): empty list of specs
  487.         }
  488.     }
  489.     err = av_open_input_stream(ic_ptr, pb, filename, fmt, ap);
           ^
  490.     if (err)
  491.         goto fail;

libavformat/utils.c:490:9: Taking true branch
  488.     }
  489.     err = av_open_input_stream(ic_ptr, pb, filename, fmt, ap);
  490.     if (err)
               ^
  491.         goto fail;
  492.     return 0;

libavformat/utils.c:493:2: 
  491.         goto fail;
  492.     return 0;
  493.  fail:
        ^
  494.     av_freep(&pd->buf);
  495.     if (pb)

libavformat/utils.c:494:5: 
  492.     return 0;
  493.  fail:
  494.     av_freep(&pd->buf);
           ^
  495.     if (pb)
  496.         url_fclose(pb);

libavutil/mem.c:133:1: start of procedure av_freep()
    131. }
    132. 
    133. void av_freep(void *arg)
         ^
    134. {
    135.     void **ptr= (void**)arg;

libavutil/mem.c:135:5: 
    133. void av_freep(void *arg)
    134. {
    135.     void **ptr= (void**)arg;
             ^
    136.     av_free(*ptr);
    137.     *ptr = NULL;

libavutil/mem.c:136:5: 
    134. {
    135.     void **ptr= (void**)arg;
    136.     av_free(*ptr);
             ^
    137.     *ptr = NULL;
    138. }

libavutil/mem.c:122:1: start of procedure av_free()
      120. }
      121. 
      122. void av_free(void *ptr)
           ^
      123. {
      124.     /* XXX: this test should not be needed on most libcs */

libavutil/mem.c:125:9: Taking false branch
      123. {
      124.     /* XXX: this test should not be needed on most libcs */
      125.     if (ptr)
                   ^
      126. #if CONFIG_MEMALIGN_HACK
      127.         free((char*)ptr - ((char*)ptr)[-1]);

libavutil/mem.c:125:5: 
      123. {
      124.     /* XXX: this test should not be needed on most libcs */
      125.     if (ptr)
               ^
      126. #if CONFIG_MEMALIGN_HACK
      127.         free((char*)ptr - ((char*)ptr)[-1]);

libavutil/mem.c:131:1: return from a call to av_free
      129.         free(ptr);
      130. #endif
      131. }
           ^
      132. 
      133. void av_freep(void *arg)

libavutil/mem.c:137:5: 
    135.     void **ptr= (void**)arg;
    136.     av_free(*ptr);
    137.     *ptr = NULL;
             ^
    138. }
    139. 

libavutil/mem.c:138:1: return from a call to av_freep
    136.     av_free(*ptr);
    137.     *ptr = NULL;
    138. }
         ^
    139. 
    140. void *av_mallocz(unsigned int size)

libavformat/utils.c:495:9: Taking false branch
  493.  fail:
  494.     av_freep(&pd->buf);
  495.     if (pb)
               ^
  496.         url_fclose(pb);
  497.     *ic_ptr = NULL;

libavformat/utils.c:497:5: 
  495.     if (pb)
  496.         url_fclose(pb);
  497.     *ic_ptr = NULL;
           ^
  498.     return err;
  499. 

libavformat/utils.c:498:5: 
  496.         url_fclose(pb);
  497.     *ic_ptr = NULL;
  498.     return err;
           ^
  499. 
  500. }

libavformat/utils.c:500:1: return from a call to av_open_input_file
  498.     return err;
  499. 
  500. }
       ^
  501. 
  502. /*******************************************************/

ffserver.c:1999:9: Taking false branch
1997. 
1998.     /* open stream */
1999.     if ((ret = av_open_input_file(&s, input_filename, c->stream->ifmt,
              ^
2000.                                   buf_size, c->stream->ap_in)) < 0) {
2001.         http_log("could not open %s: %d\n", input_filename, ret);

ffserver.c:2004:5: 
2002.         return -1;
2003.     }
2004.     s->flags |= AVFMT_FLAG_GENPTS;
          ^
2005.     c->fmt_in = s;
2006.     if (strcmp(s->iformat->name, "ffm") && av_find_stream_info(c->fmt_in) < 0) {
