libavfilter/avfilter.c:320: error: Null Dereference
  pointer `ret` last assigned on line 315 could be null and is dereferenced by call to `ff_dlog_ref()` at line 320, column 106.

libavfilter/avfilter.c:303:1: start of procedure avfilter_get_video_buffer()
301. }
302. 
303. AVFilterBufferRef *avfilter_get_video_buffer(AVFilterLink *link, int perms, int w, int h)
     ^
304. {
305.     AVFilterBufferRef *ret = NULL;

libavfilter/avfilter.c:305:5: 
303. AVFilterBufferRef *avfilter_get_video_buffer(AVFilterLink *link, int perms, int w, int h)
304. {
305.     AVFilterBufferRef *ret = NULL;
         ^
306. 
307.     av_unused char buf[16];

libavfilter/avfilter.c:308:47: 
306. 
307.     av_unused char buf[16];
308.     FF_DPRINTF_START(NULL, get_video_buffer); ff_dlog_link(NULL, link, 0);
                                                   ^
309.     av_dlog(NULL, " perms:%s w:%d h:%d\n", ff_get_ref_perms_string(buf, sizeof(buf), perms), w, h);
310. 

libavfilter/avfilter.c:279:1: start of procedure ff_dlog_link()
  277. }
  278. 
  279. void ff_dlog_link(void *ctx, AVFilterLink *link, int end)
       ^
  280. {
  281.     if (link->type == AVMEDIA_TYPE_VIDEO) {

libavfilter/avfilter.c:281:9: Taking false branch
  279. void ff_dlog_link(void *ctx, AVFilterLink *link, int end)
  280. {
  281.     if (link->type == AVMEDIA_TYPE_VIDEO) {
               ^
  282.         av_dlog(ctx,
  283.                 "link[%p s:%dx%d fmt:%-16s %-16s->%-16s]%s",

libavfilter/avfilter.c:291:9: Skipping av_get_channel_layout_string(): empty list of specs
  289.     } else {
  290.         char buf[128];
  291.         av_get_channel_layout_string(buf, sizeof(buf), -1, link->channel_layout);
               ^
  292. 
  293.         av_dlog(ctx,

libavfilter/avfilter.c:281:5: 
  279. void ff_dlog_link(void *ctx, AVFilterLink *link, int end)
  280. {
  281.     if (link->type == AVMEDIA_TYPE_VIDEO) {
           ^
  282.         av_dlog(ctx,
  283.                 "link[%p s:%dx%d fmt:%-16s %-16s->%-16s]%s",

libavfilter/avfilter.c:301:1: return from a call to ff_dlog_link
  299.                 end ? "\n" : "");
  300.     }
  301. }
       ^
  302. 
  303. AVFilterBufferRef *avfilter_get_video_buffer(AVFilterLink *link, int perms, int w, int h)

libavfilter/avfilter.c:311:9: Taking true branch
309.     av_dlog(NULL, " perms:%s w:%d h:%d\n", ff_get_ref_perms_string(buf, sizeof(buf), perms), w, h);
310. 
311.     if (link->dstpad->get_video_buffer)
             ^
312.         ret = link->dstpad->get_video_buffer(link, perms, w, h);
313. 

libavfilter/avfilter.c:312:9: Skipping __function_pointer__(): unresolved function pointer
310. 
311.     if (link->dstpad->get_video_buffer)
312.         ret = link->dstpad->get_video_buffer(link, perms, w, h);
             ^
313. 
314.     if (!ret)

libavfilter/avfilter.c:314:10: Taking true branch
312.         ret = link->dstpad->get_video_buffer(link, perms, w, h);
313. 
314.     if (!ret)
              ^
315.         ret = avfilter_default_get_video_buffer(link, perms, w, h);
316. 

libavfilter/avfilter.c:315:9: 
313. 
314.     if (!ret)
315.         ret = avfilter_default_get_video_buffer(link, perms, w, h);
             ^
316. 
317.     if (ret)

libavfilter/defaults.c:41:1: start of procedure avfilter_default_get_video_buffer()
  39.  * filter chain.  This will allow for a buffer pool instead of the constant
  40.  * alloc & free cycle currently implemented. */
  41. AVFilterBufferRef *avfilter_default_get_video_buffer(AVFilterLink *link, int perms, int w, int h)
      ^
  42. {
  43.     int linesize[4];

libavfilter/defaults.c:45:5: 
  43.     int linesize[4];
  44.     uint8_t *data[4];
  45.     AVFilterBufferRef *picref = NULL;
          ^
  46. 
  47.     // +2 is needed for swscaler, +16 to be SIMD-friendly

libavfilter/defaults.c:48:9: Taking true branch
  46. 
  47.     // +2 is needed for swscaler, +16 to be SIMD-friendly
  48.     if (av_image_alloc(data, linesize, w, h, link->format, 16) < 0)
              ^
  49.         return NULL;
  50. 

libavfilter/defaults.c:49:9: 
  47.     // +2 is needed for swscaler, +16 to be SIMD-friendly
  48.     if (av_image_alloc(data, linesize, w, h, link->format, 16) < 0)
  49.         return NULL;
              ^
  50. 
  51.     picref = avfilter_get_video_buffer_ref_from_arrays(data, linesize,

libavfilter/defaults.c:59:1: return from a call to avfilter_default_get_video_buffer
  57. 
  58.     return picref;
  59. }
      ^
  60. 
  61. void avfilter_default_start_frame(AVFilterLink *inlink, AVFilterBufferRef *picref)

libavfilter/avfilter.c:317:9: Taking false branch
315.         ret = avfilter_default_get_video_buffer(link, perms, w, h);
316. 
317.     if (ret)
             ^
318.         ret->type = AVMEDIA_TYPE_VIDEO;
319. 

libavfilter/avfilter.c:320:47: 
318.         ret->type = AVMEDIA_TYPE_VIDEO;
319. 
320.     FF_DPRINTF_START(NULL, get_video_buffer); ff_dlog_link(NULL, link, 0); av_dlog(NULL, " returning "); ff_dlog_ref(NULL, ret, 1);
                                                   ^
321. 
322.     return ret;

libavfilter/avfilter.c:279:1: start of procedure ff_dlog_link()
  277. }
  278. 
  279. void ff_dlog_link(void *ctx, AVFilterLink *link, int end)
       ^
  280. {
  281.     if (link->type == AVMEDIA_TYPE_VIDEO) {

libavfilter/avfilter.c:281:9: Taking false branch
  279. void ff_dlog_link(void *ctx, AVFilterLink *link, int end)
  280. {
  281.     if (link->type == AVMEDIA_TYPE_VIDEO) {
               ^
  282.         av_dlog(ctx,
  283.                 "link[%p s:%dx%d fmt:%-16s %-16s->%-16s]%s",

libavfilter/avfilter.c:291:9: Skipping av_get_channel_layout_string(): empty list of specs
  289.     } else {
  290.         char buf[128];
  291.         av_get_channel_layout_string(buf, sizeof(buf), -1, link->channel_layout);
               ^
  292. 
  293.         av_dlog(ctx,

libavfilter/avfilter.c:281:5: 
  279. void ff_dlog_link(void *ctx, AVFilterLink *link, int end)
  280. {
  281.     if (link->type == AVMEDIA_TYPE_VIDEO) {
           ^
  282.         av_dlog(ctx,
  283.                 "link[%p s:%dx%d fmt:%-16s %-16s->%-16s]%s",

libavfilter/avfilter.c:301:1: return from a call to ff_dlog_link
  299.                 end ? "\n" : "");
  300.     }
  301. }
       ^
  302. 
  303. AVFilterBufferRef *avfilter_get_video_buffer(AVFilterLink *link, int perms, int w, int h)

libavfilter/avfilter.c:320:106: 
318.         ret->type = AVMEDIA_TYPE_VIDEO;
319. 
320.     FF_DPRINTF_START(NULL, get_video_buffer); ff_dlog_link(NULL, link, 0); av_dlog(NULL, " returning "); ff_dlog_ref(NULL, ret, 1);
                                                                                                              ^
321. 
322.     return ret;

libavfilter/avfilter.c:250:1: start of procedure ff_dlog_ref()
  248. #endif
  249. 
  250. static void ff_dlog_ref(void *ctx, AVFilterBufferRef *ref, int end)
       ^
  251. {
  252.     av_unused char buf[16];

libavfilter/avfilter.c:259:9: Taking false branch
  257.             ref->pts, ref->pos);
  258. 
  259.     if (ref->video) {
               ^
  260.         av_dlog(ctx, " a:%d/%d s:%dx%d i:%c iskey:%d type:%c",
  261.                 ref->video->pixel_aspect.num, ref->video->pixel_aspect.den,
