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

libavfilter/avfilter.c:304:1: start of procedure avfilter_get_video_buffer()
302. #define FF_DPRINTF_START(ctx, func) av_dlog(NULL, "%-16s: ", #func)
303. 
304. AVFilterBufferRef *avfilter_get_video_buffer(AVFilterLink *link, int perms, int w, int h)
     ^
305. {
306.     AVFilterBufferRef *ret = NULL;

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

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

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

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

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

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

libavfilter/avfilter.c:300:1: return from a call to ff_dlog_link
  298.                 end ? "\n" : "");
  299.     }
  300. }
       ^
  301. 
  302. #define FF_DPRINTF_START(ctx, func) av_dlog(NULL, "%-16s: ", #func)

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

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

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

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

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

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

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

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

libavfilter/defaults.c:58:1: return from a call to avfilter_default_get_video_buffer
  56. 
  57.     return picref;
  58. }
      ^
  59. 
  60. AVFilterBufferRef *avfilter_default_get_audio_buffer(AVFilterLink *link, int perms,

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

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

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

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

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

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

libavfilter/avfilter.c:300:1: return from a call to ff_dlog_link
  298.                 end ? "\n" : "");
  299.     }
  300. }
       ^
  301. 
  302. #define FF_DPRINTF_START(ctx, func) av_dlog(NULL, "%-16s: ", #func)

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

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

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