libavformat/dv.c:351: error: Null Dereference
  pointer `sys` last assigned on line 348 could be null and is dereferenced at line 351, column 38.

libavformat/dv.c:344:1: start of procedure dv_frame_offset()
342. }
343. 
344. static int64_t dv_frame_offset(AVFormatContext *s, DVDemuxContext *c,
     ^
345.                               int64_t timestamp, int flags)
346. {

libavformat/dv.c:348:5: 
346. {
347.     // FIXME: sys may be wrong if last dv_read_packet() failed (buffer is junk)
348.     const DVprofile* sys = dv_codec_profile(c->vst->codec);
         ^
349.     int64_t offset;
350.     int64_t size = url_fsize(s->pb);

libavcodec/dvdata.h:2684:1: start of procedure dv_codec_profile()
  2682. }
  2683. 
  2684. static inline const DVprofile* dv_codec_profile(AVCodecContext* codec)
        ^
  2685. {
  2686.     int i;

libavcodec/dvdata.h:2688:9: Taking false branch
  2686.     int i;
  2687. 
  2688.     if (codec->width != 720)
                ^
  2689.         return NULL;
  2690. 

libavcodec/dvdata.h:2691:10: 
  2689.         return NULL;
  2690. 
  2691.     for (i=0; i<sizeof(dv_profiles)/sizeof(DVprofile); i++)
                 ^
  2692.        if (codec->height == dv_profiles[i].height && codec->pix_fmt == dv_profiles[i].pix_fmt)
  2693.            return &dv_profiles[i];

libavcodec/dvdata.h:2691:15: Loop condition is true. Entering loop body
  2689.         return NULL;
  2690. 
  2691.     for (i=0; i<sizeof(dv_profiles)/sizeof(DVprofile); i++)
                      ^
  2692.        if (codec->height == dv_profiles[i].height && codec->pix_fmt == dv_profiles[i].pix_fmt)
  2693.            return &dv_profiles[i];

libavcodec/dvdata.h:2692:12: Taking false branch
  2690. 
  2691.     for (i=0; i<sizeof(dv_profiles)/sizeof(DVprofile); i++)
  2692.        if (codec->height == dv_profiles[i].height && codec->pix_fmt == dv_profiles[i].pix_fmt)
                   ^
  2693.            return &dv_profiles[i];
  2694. 

libavcodec/dvdata.h:2691:56: 
  2689.         return NULL;
  2690. 
  2691.     for (i=0; i<sizeof(dv_profiles)/sizeof(DVprofile); i++)
                                                               ^
  2692.        if (codec->height == dv_profiles[i].height && codec->pix_fmt == dv_profiles[i].pix_fmt)
  2693.            return &dv_profiles[i];

libavcodec/dvdata.h:2691:15: Loop condition is false. Leaving loop
  2689.         return NULL;
  2690. 
  2691.     for (i=0; i<sizeof(dv_profiles)/sizeof(DVprofile); i++)
                      ^
  2692.        if (codec->height == dv_profiles[i].height && codec->pix_fmt == dv_profiles[i].pix_fmt)
  2693.            return &dv_profiles[i];

libavcodec/dvdata.h:2695:5: 
  2693.            return &dv_profiles[i];
  2694. 
  2695.     return NULL;
            ^
  2696. }
  2697. 

libavcodec/dvdata.h:2696:1: return from a call to dv_codec_profile
  2694. 
  2695.     return NULL;
  2696. }
        ^
  2697. 
  2698. static inline int dv_write_dif_id(enum dv_section_type t, uint8_t chan_num, uint8_t seq_num,

libavformat/dv.c:350:5: 
348.     const DVprofile* sys = dv_codec_profile(c->vst->codec);
349.     int64_t offset;
350.     int64_t size = url_fsize(s->pb);
         ^
351.     int64_t max_offset = ((size-1) / sys->frame_size) * sys->frame_size;
352. 

libavformat/aviobuf.c:189:1: start of procedure url_fsize()
  187. }
  188. 
  189. offset_t url_fsize(ByteIOContext *s)
       ^
  190. {
  191.     offset_t size;

libavformat/aviobuf.c:193:9: Taking false branch
  191.     offset_t size;
  192. 
  193.     if(!s)
               ^
  194.         return AVERROR(EINVAL);
  195. 

libavformat/aviobuf.c:196:10: Taking false branch
  194.         return AVERROR(EINVAL);
  195. 
  196.     if (!s->seek)
                ^
  197.         return AVERROR(EPIPE);
  198.     size = s->seek(s->opaque, 0, AVSEEK_SIZE);

libavformat/aviobuf.c:198:5: Skipping __function_pointer__(): unresolved function pointer
  196.     if (!s->seek)
  197.         return AVERROR(EPIPE);
  198.     size = s->seek(s->opaque, 0, AVSEEK_SIZE);
           ^
  199.     if(size<0){
  200.         if ((size = s->seek(s->opaque, -1, SEEK_END)) < 0)

libavformat/aviobuf.c:199:8: Taking true branch
  197.         return AVERROR(EPIPE);
  198.     size = s->seek(s->opaque, 0, AVSEEK_SIZE);
  199.     if(size<0){
              ^
  200.         if ((size = s->seek(s->opaque, -1, SEEK_END)) < 0)
  201.             return size;

libavformat/aviobuf.c:200:13: Taking false branch
  198.     size = s->seek(s->opaque, 0, AVSEEK_SIZE);
  199.     if(size<0){
  200.         if ((size = s->seek(s->opaque, -1, SEEK_END)) < 0)
                   ^
  201.             return size;
  202.         size++;

libavformat/aviobuf.c:202:9: 
  200.         if ((size = s->seek(s->opaque, -1, SEEK_END)) < 0)
  201.             return size;
  202.         size++;
               ^
  203.         s->seek(s->opaque, s->pos, SEEK_SET);
  204.     }

libavformat/aviobuf.c:203:9: Skipping __function_pointer__(): unresolved function pointer
  201.             return size;
  202.         size++;
  203.         s->seek(s->opaque, s->pos, SEEK_SET);
               ^
  204.     }
  205.     return size;

libavformat/aviobuf.c:205:5: 
  203.         s->seek(s->opaque, s->pos, SEEK_SET);
  204.     }
  205.     return size;
           ^
  206. }
  207. 

libavformat/aviobuf.c:206:1: return from a call to url_fsize
  204.     }
  205.     return size;
  206. }
       ^
  207. 
  208. int url_feof(ByteIOContext *s)

libavformat/dv.c:351:5: 
349.     int64_t offset;
350.     int64_t size = url_fsize(s->pb);
351.     int64_t max_offset = ((size-1) / sys->frame_size) * sys->frame_size;
         ^
352. 
353.     offset = sys->frame_size * timestamp;
