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

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

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

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

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:148:9: Taking true branch
146.     av_dlog(NULL, " perms:%s w:%d h:%d\n", ff_get_ref_perms_string(buf, sizeof(buf), perms), w, h);
147. 
148.     if (link->dstpad->get_video_buffer)
             ^
149.         ret = link->dstpad->get_video_buffer(link, perms, w, h);
150. 

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

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

libavfilter/video.c:152:9: 
150. 
151.     if (!ret)
152.         ret = avfilter_default_get_video_buffer(link, perms, w, h);
             ^
153. 
154.     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:154:9: Taking false branch
152.         ret = avfilter_default_get_video_buffer(link, perms, w, h);
153. 
154.     if (ret)
             ^
155.         ret->type = AVMEDIA_TYPE_VIDEO;
156. 

libavfilter/video.c:157:47: 
155.         ret->type = AVMEDIA_TYPE_VIDEO;
156. 
157.     FF_DPRINTF_START(NULL, get_video_buffer); ff_dlog_link(NULL, link, 0); av_dlog(NULL, " returning "); ff_dlog_ref(NULL, ret, 1);
                                                   ^
158. 
159.     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:157:106: 
155.         ret->type = AVMEDIA_TYPE_VIDEO;
156. 
157.     FF_DPRINTF_START(NULL, get_video_buffer); ff_dlog_link(NULL, link, 0); av_dlog(NULL, " returning "); ff_dlog_ref(NULL, ret, 1);
                                                                                                              ^
158. 
159.     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,
