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

libavfilter/avfilter.c:289:1: start of procedure avfilter_get_video_buffer()
287. #define FF_DPRINTF_START(ctx, func) av_dlog(NULL, "%-16s: ", #func)
288. 
289. AVFilterBufferRef *avfilter_get_video_buffer(AVFilterLink *link, int perms, int w, int h)
     ^
290. {
291.     AVFilterBufferRef *ret = NULL;

libavfilter/avfilter.c:291:5: 
289. AVFilterBufferRef *avfilter_get_video_buffer(AVFilterLink *link, int perms, int w, int h)
290. {
291.     AVFilterBufferRef *ret = NULL;
         ^
292. 
293.     av_unused char buf[16];

libavfilter/avfilter.c:294:47: 
292. 
293.     av_unused char buf[16];
294.     FF_DPRINTF_START(NULL, get_video_buffer); ff_dlog_link(NULL, link, 0);
                                                   ^
295.     av_dlog(NULL, " perms:%s w:%d h:%d\n", ff_get_ref_perms_string(buf, sizeof(buf), perms), w, h);
296. 

libavfilter/avfilter.c:263:1: start of procedure ff_dlog_link()
  261. }
  262. 
  263. static void ff_dlog_link(void *ctx, AVFilterLink *link, int end)
       ^
  264. {
  265.     if (link->type == AVMEDIA_TYPE_VIDEO) {

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

libavfilter/avfilter.c:275:9: Skipping av_get_channel_layout_string(): empty list of specs
  273.     } else {
  274.         char buf[128];
  275.         av_get_channel_layout_string(buf, sizeof(buf), -1, link->channel_layout);
               ^
  276. 
  277.         av_dlog(ctx,

libavfilter/avfilter.c:265:5: 
  263. static void ff_dlog_link(void *ctx, AVFilterLink *link, int end)
  264. {
  265.     if (link->type == AVMEDIA_TYPE_VIDEO) {
           ^
  266.         av_dlog(ctx,
  267.                 "link[%p s:%dx%d fmt:%-16s %-16s->%-16s]%s",

libavfilter/avfilter.c:285:1: return from a call to ff_dlog_link
  283.                 end ? "\n" : "");
  284.     }
  285. }
       ^
  286. 
  287. #define FF_DPRINTF_START(ctx, func) av_dlog(NULL, "%-16s: ", #func)

libavfilter/avfilter.c:297:9: Taking true branch
295.     av_dlog(NULL, " perms:%s w:%d h:%d\n", ff_get_ref_perms_string(buf, sizeof(buf), perms), w, h);
296. 
297.     if (link->dstpad->get_video_buffer)
             ^
298.         ret = link->dstpad->get_video_buffer(link, perms, w, h);
299. 

libavfilter/avfilter.c:298:9: Skipping __function_pointer__(): unresolved function pointer
296. 
297.     if (link->dstpad->get_video_buffer)
298.         ret = link->dstpad->get_video_buffer(link, perms, w, h);
             ^
299. 
300.     if (!ret)

libavfilter/avfilter.c:300:10: Taking true branch
298.         ret = link->dstpad->get_video_buffer(link, perms, w, h);
299. 
300.     if (!ret)
              ^
301.         ret = avfilter_default_get_video_buffer(link, perms, w, h);
302. 

libavfilter/avfilter.c:301:9: 
299. 
300.     if (!ret)
301.         ret = avfilter_default_get_video_buffer(link, perms, w, h);
             ^
302. 
303.     if (ret)

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

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

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

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

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

libavfilter/avfilter.c:303:9: Taking false branch
301.         ret = avfilter_default_get_video_buffer(link, perms, w, h);
302. 
303.     if (ret)
             ^
304.         ret->type = AVMEDIA_TYPE_VIDEO;
305. 

libavfilter/avfilter.c:306:47: 
304.         ret->type = AVMEDIA_TYPE_VIDEO;
305. 
306.     FF_DPRINTF_START(NULL, get_video_buffer); ff_dlog_link(NULL, link, 0); av_dlog(NULL, " returning "); ff_dlog_ref(NULL, ret, 1);
                                                   ^
307. 
308.     return ret;

libavfilter/avfilter.c:263:1: start of procedure ff_dlog_link()
  261. }
  262. 
  263. static void ff_dlog_link(void *ctx, AVFilterLink *link, int end)
       ^
  264. {
  265.     if (link->type == AVMEDIA_TYPE_VIDEO) {

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

libavfilter/avfilter.c:275:9: Skipping av_get_channel_layout_string(): empty list of specs
  273.     } else {
  274.         char buf[128];
  275.         av_get_channel_layout_string(buf, sizeof(buf), -1, link->channel_layout);
               ^
  276. 
  277.         av_dlog(ctx,

libavfilter/avfilter.c:265:5: 
  263. static void ff_dlog_link(void *ctx, AVFilterLink *link, int end)
  264. {
  265.     if (link->type == AVMEDIA_TYPE_VIDEO) {
           ^
  266.         av_dlog(ctx,
  267.                 "link[%p s:%dx%d fmt:%-16s %-16s->%-16s]%s",

libavfilter/avfilter.c:285:1: return from a call to ff_dlog_link
  283.                 end ? "\n" : "");
  284.     }
  285. }
       ^
  286. 
  287. #define FF_DPRINTF_START(ctx, func) av_dlog(NULL, "%-16s: ", #func)

libavfilter/avfilter.c:306:106: 
304.         ret->type = AVMEDIA_TYPE_VIDEO;
305. 
306.     FF_DPRINTF_START(NULL, get_video_buffer); ff_dlog_link(NULL, link, 0); av_dlog(NULL, " returning "); ff_dlog_ref(NULL, ret, 1);
                                                                                                              ^
307. 
308.     return ret;

libavfilter/avfilter.c:233:1: start of procedure ff_dlog_ref()
  231. #endif
  232. 
  233. static void ff_dlog_ref(void *ctx, AVFilterBufferRef *ref, int end)
       ^
  234. {
  235.     av_unused char buf[16];

libavfilter/avfilter.c:242:9: Taking false branch
  240.             ref->pts, ref->pos);
  241. 
  242.     if (ref->video) {
               ^
  243.         av_dlog(ctx, " a:%d/%d s:%dx%d i:%c iskey:%d type:%c",
  244.                 ref->video->pixel_aspect.num, ref->video->pixel_aspect.den,
