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

libavfilter/video.c:145:1: start of procedure ff_get_video_buffer()
143. }
144. 
145. AVFilterBufferRef *ff_get_video_buffer(AVFilterLink *link, int perms, int w, int h)
     ^
146. {
147.     AVFilterBufferRef *ret = NULL;

libavfilter/video.c:147:5: 
145. AVFilterBufferRef *ff_get_video_buffer(AVFilterLink *link, int perms, int w, int h)
146. {
147.     AVFilterBufferRef *ret = NULL;
         ^
148. 
149.     av_unused char buf[16];

libavfilter/video.c:150:47: 
148. 
149.     av_unused char buf[16];
150.     FF_DPRINTF_START(NULL, get_video_buffer); ff_dlog_link(NULL, link, 0);
                                                   ^
151.     av_dlog(NULL, " perms:%s w:%d h:%d\n", ff_get_ref_perms_string(buf, sizeof(buf), perms), w, h);
152. 

libavfilter/avfilter.c:211:1: start of procedure ff_dlog_link()
  209. }
  210. 
  211. void ff_dlog_link(void *ctx, AVFilterLink *link, int end)
       ^
  212. {
  213.     if (link->type == AVMEDIA_TYPE_VIDEO) {

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

libavfilter/avfilter.c:223:9: Skipping av_get_channel_layout_string(): empty list of specs
  221.     } else {
  222.         char buf[128];
  223.         av_get_channel_layout_string(buf, sizeof(buf), -1, link->channel_layout);
               ^
  224. 
  225.         av_dlog(ctx,

libavfilter/avfilter.c:213:5: 
  211. void ff_dlog_link(void *ctx, AVFilterLink *link, int end)
  212. {
  213.     if (link->type == AVMEDIA_TYPE_VIDEO) {
           ^
  214.         av_dlog(ctx,
  215.                 "link[%p s:%dx%d fmt:%-16s %-16s->%-16s]%s",

libavfilter/avfilter.c:233:1: return from a call to ff_dlog_link
  231.                 end ? "\n" : "");
  232.     }
  233. }
       ^
  234. 
  235. int ff_request_frame(AVFilterLink *link)

libavfilter/video.c:153:9: Taking true branch
151.     av_dlog(NULL, " perms:%s w:%d h:%d\n", ff_get_ref_perms_string(buf, sizeof(buf), perms), w, h);
152. 
153.     if (link->dstpad->get_video_buffer)
             ^
154.         ret = link->dstpad->get_video_buffer(link, perms, w, h);
155. 

libavfilter/video.c:154:9: Skipping __function_pointer__(): unresolved function pointer
152. 
153.     if (link->dstpad->get_video_buffer)
154.         ret = link->dstpad->get_video_buffer(link, perms, w, h);
             ^
155. 
156.     if (!ret)

libavfilter/video.c:156:10: Taking true branch
154.         ret = link->dstpad->get_video_buffer(link, perms, w, h);
155. 
156.     if (!ret)
              ^
157.         ret = ff_default_get_video_buffer(link, perms, w, h);
158. 

libavfilter/video.c:157:9: 
155. 
156.     if (!ret)
157.         ret = ff_default_get_video_buffer(link, perms, w, h);
             ^
158. 
159.     if (ret)

libavfilter/video.c:80:1: start of procedure ff_default_get_video_buffer()
  78.  * filter chain.  This will allow for a buffer pool instead of the constant
  79.  * alloc & free cycle currently implemented. */
  80. AVFilterBufferRef *ff_default_get_video_buffer(AVFilterLink *link, int perms, int w, int h)
      ^
  81. {
  82.     int linesize[4];

libavfilter/video.c:84:5: 
  82.     int linesize[4];
  83.     uint8_t *data[4];
  84.     AVFilterBufferRef *picref = NULL;
          ^
  85. 
  86.     // +2 is needed for swscaler, +16 to be SIMD-friendly

libavfilter/video.c:87:9: Taking true branch
  85. 
  86.     // +2 is needed for swscaler, +16 to be SIMD-friendly
  87.     if (av_image_alloc(data, linesize, w, h, link->format, 16) < 0)
              ^
  88.         return NULL;
  89. 

libavfilter/video.c:88:9: 
  86.     // +2 is needed for swscaler, +16 to be SIMD-friendly
  87.     if (av_image_alloc(data, linesize, w, h, link->format, 16) < 0)
  88.         return NULL;
              ^
  89. 
  90.     picref = avfilter_get_video_buffer_ref_from_arrays(data, linesize,

libavfilter/video.c:98:1: return from a call to ff_default_get_video_buffer
   96. 
   97.     return picref;
   98. }
       ^
   99. 
  100. AVFilterBufferRef *

libavfilter/video.c:159:9: Taking false branch
157.         ret = ff_default_get_video_buffer(link, perms, w, h);
158. 
159.     if (ret)
             ^
160.         ret->type = AVMEDIA_TYPE_VIDEO;
161. 

libavfilter/video.c:162:47: 
160.         ret->type = AVMEDIA_TYPE_VIDEO;
161. 
162.     FF_DPRINTF_START(NULL, get_video_buffer); ff_dlog_link(NULL, link, 0); av_dlog(NULL, " returning "); ff_dlog_ref(NULL, ret, 1);
                                                   ^
163. 
164.     return ret;

libavfilter/avfilter.c:211:1: start of procedure ff_dlog_link()
  209. }
  210. 
  211. void ff_dlog_link(void *ctx, AVFilterLink *link, int end)
       ^
  212. {
  213.     if (link->type == AVMEDIA_TYPE_VIDEO) {

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

libavfilter/avfilter.c:223:9: Skipping av_get_channel_layout_string(): empty list of specs
  221.     } else {
  222.         char buf[128];
  223.         av_get_channel_layout_string(buf, sizeof(buf), -1, link->channel_layout);
               ^
  224. 
  225.         av_dlog(ctx,

libavfilter/avfilter.c:213:5: 
  211. void ff_dlog_link(void *ctx, AVFilterLink *link, int end)
  212. {
  213.     if (link->type == AVMEDIA_TYPE_VIDEO) {
           ^
  214.         av_dlog(ctx,
  215.                 "link[%p s:%dx%d fmt:%-16s %-16s->%-16s]%s",

libavfilter/avfilter.c:233:1: return from a call to ff_dlog_link
  231.                 end ? "\n" : "");
  232.     }
  233. }
       ^
  234. 
  235. int ff_request_frame(AVFilterLink *link)

libavfilter/video.c:162:106: 
160.         ret->type = AVMEDIA_TYPE_VIDEO;
161. 
162.     FF_DPRINTF_START(NULL, get_video_buffer); ff_dlog_link(NULL, link, 0); av_dlog(NULL, " returning "); ff_dlog_ref(NULL, ret, 1);
                                                                                                              ^
163. 
164.     return ret;

libavfilter/video.c:43:1: start of procedure ff_dlog_ref()
  41. #endif
  42. 
  43. static void ff_dlog_ref(void *ctx, AVFilterBufferRef *ref, int end)
      ^
  44. {
  45.     av_unused char buf[16];

libavfilter/video.c:52:9: Taking false branch
  50.             ref->pts, ref->pos);
  51. 
  52.     if (ref->video) {
              ^
  53.         av_dlog(ctx, " a:%d/%d s:%dx%d i:%c iskey:%d type:%c",
  54.                 ref->video->pixel_aspect.num, ref->video->pixel_aspect.den,
