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

libavfilter/video.c:138:1: start of procedure avfilter_get_video_buffer()
136. }
137. 
138. AVFilterBufferRef *avfilter_get_video_buffer(AVFilterLink *link, int perms, int w, int h)
     ^
139. {
140.     AVFilterBufferRef *ret = NULL;

libavfilter/video.c:140:5: 
138. AVFilterBufferRef *avfilter_get_video_buffer(AVFilterLink *link, int perms, int w, int h)
139. {
140.     AVFilterBufferRef *ret = NULL;
         ^
141. 
142.     av_unused char buf[16];

libavfilter/video.c:143:47: 
141. 
142.     av_unused char buf[16];
143.     FF_DPRINTF_START(NULL, get_video_buffer); ff_dlog_link(NULL, link, 0);
                                                   ^
144.     av_dlog(NULL, " perms:%s w:%d h:%d\n", ff_get_ref_perms_string(buf, sizeof(buf), perms), w, h);
145. 

libavfilter/avfilter.c:182:1: start of procedure ff_dlog_link()
  180. }
  181. 
  182. void ff_dlog_link(void *ctx, AVFilterLink *link, int end)
       ^
  183. {
  184.     if (link->type == AVMEDIA_TYPE_VIDEO) {

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

libavfilter/avfilter.c:194:9: Skipping av_get_channel_layout_string(): empty list of specs
  192.     } else {
  193.         char buf[128];
  194.         av_get_channel_layout_string(buf, sizeof(buf), -1, link->channel_layout);
               ^
  195. 
  196.         av_dlog(ctx,

libavfilter/avfilter.c:184:5: 
  182. void ff_dlog_link(void *ctx, AVFilterLink *link, int end)
  183. {
  184.     if (link->type == AVMEDIA_TYPE_VIDEO) {
           ^
  185.         av_dlog(ctx,
  186.                 "link[%p s:%dx%d fmt:%-16s %-16s->%-16s]%s",

libavfilter/avfilter.c:204:1: return from a call to ff_dlog_link
  202.                 end ? "\n" : "");
  203.     }
  204. }
       ^
  205. 
  206. int avfilter_request_frame(AVFilterLink *link)

libavfilter/video.c:146:9: Taking true branch
144.     av_dlog(NULL, " perms:%s w:%d h:%d\n", ff_get_ref_perms_string(buf, sizeof(buf), perms), w, h);
145. 
146.     if (link->dstpad->get_video_buffer)
             ^
147.         ret = link->dstpad->get_video_buffer(link, perms, w, h);
148. 

libavfilter/video.c:147:9: Skipping __function_pointer__(): unresolved function pointer
145. 
146.     if (link->dstpad->get_video_buffer)
147.         ret = link->dstpad->get_video_buffer(link, perms, w, h);
             ^
148. 
149.     if (!ret)

libavfilter/video.c:149:10: Taking true branch
147.         ret = link->dstpad->get_video_buffer(link, perms, w, h);
148. 
149.     if (!ret)
              ^
150.         ret = avfilter_default_get_video_buffer(link, perms, w, h);
151. 

libavfilter/video.c:150:9: 
148. 
149.     if (!ret)
150.         ret = avfilter_default_get_video_buffer(link, perms, w, h);
             ^
151. 
152.     if (ret)

libavfilter/video.c:75:1: start of procedure avfilter_default_get_video_buffer()
  73.  * filter chain.  This will allow for a buffer pool instead of the constant
  74.  * alloc & free cycle currently implemented. */
  75. AVFilterBufferRef *avfilter_default_get_video_buffer(AVFilterLink *link, int perms, int w, int h)
      ^
  76. {
  77.     int linesize[4];

libavfilter/video.c:79:5: 
  77.     int linesize[4];
  78.     uint8_t *data[4];
  79.     AVFilterBufferRef *picref = NULL;
          ^
  80. 
  81.     // +2 is needed for swscaler, +16 to be SIMD-friendly

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

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

libavfilter/video.c:93:1: return from a call to avfilter_default_get_video_buffer
  91. 
  92.     return picref;
  93. }
      ^
  94. 
  95. AVFilterBufferRef *

libavfilter/video.c:152:9: Taking false branch
150.         ret = avfilter_default_get_video_buffer(link, perms, w, h);
151. 
152.     if (ret)
             ^
153.         ret->type = AVMEDIA_TYPE_VIDEO;
154. 

libavfilter/video.c:155:47: 
153.         ret->type = AVMEDIA_TYPE_VIDEO;
154. 
155.     FF_DPRINTF_START(NULL, get_video_buffer); ff_dlog_link(NULL, link, 0); av_dlog(NULL, " returning "); ff_dlog_ref(NULL, ret, 1);
                                                   ^
156. 
157.     return ret;

libavfilter/avfilter.c:182:1: start of procedure ff_dlog_link()
  180. }
  181. 
  182. void ff_dlog_link(void *ctx, AVFilterLink *link, int end)
       ^
  183. {
  184.     if (link->type == AVMEDIA_TYPE_VIDEO) {

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

libavfilter/avfilter.c:194:9: Skipping av_get_channel_layout_string(): empty list of specs
  192.     } else {
  193.         char buf[128];
  194.         av_get_channel_layout_string(buf, sizeof(buf), -1, link->channel_layout);
               ^
  195. 
  196.         av_dlog(ctx,

libavfilter/avfilter.c:184:5: 
  182. void ff_dlog_link(void *ctx, AVFilterLink *link, int end)
  183. {
  184.     if (link->type == AVMEDIA_TYPE_VIDEO) {
           ^
  185.         av_dlog(ctx,
  186.                 "link[%p s:%dx%d fmt:%-16s %-16s->%-16s]%s",

libavfilter/avfilter.c:204:1: return from a call to ff_dlog_link
  202.                 end ? "\n" : "");
  203.     }
  204. }
       ^
  205. 
  206. int avfilter_request_frame(AVFilterLink *link)

libavfilter/video.c:155:106: 
153.         ret->type = AVMEDIA_TYPE_VIDEO;
154. 
155.     FF_DPRINTF_START(NULL, get_video_buffer); ff_dlog_link(NULL, link, 0); av_dlog(NULL, " returning "); ff_dlog_ref(NULL, ret, 1);
                                                                                                              ^
156. 
157.     return ret;

libavfilter/video.c:38:1: start of procedure ff_dlog_ref()
  36. #endif
  37. 
  38. static void ff_dlog_ref(void *ctx, AVFilterBufferRef *ref, int end)
      ^
  39. {
  40.     av_unused char buf[16];

libavfilter/video.c:47:9: Taking false branch
  45.             ref->pts, ref->pos);
  46. 
  47.     if (ref->video) {
              ^
  48.         av_dlog(ctx, " a:%d/%d s:%dx%d i:%c iskey:%d type:%c",
  49.                 ref->video->pixel_aspect.num, ref->video->pixel_aspect.den,
