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

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

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

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

libavfilter/avfilter.c:202:1: start of procedure ff_dlog_link()
  200. }
  201. 
  202. void ff_dlog_link(void *ctx, AVFilterLink *link, int end)
       ^
  203. {
  204.     if (link->type == AVMEDIA_TYPE_VIDEO) {

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

libavfilter/avfilter.c:214:9: Skipping av_get_channel_layout_string(): empty list of specs
  212.     } else {
  213.         char buf[128];
  214.         av_get_channel_layout_string(buf, sizeof(buf), -1, link->channel_layout);
               ^
  215. 
  216.         av_dlog(ctx,

libavfilter/avfilter.c:204:5: 
  202. void ff_dlog_link(void *ctx, AVFilterLink *link, int end)
  203. {
  204.     if (link->type == AVMEDIA_TYPE_VIDEO) {
           ^
  205.         av_dlog(ctx,
  206.                 "link[%p s:%dx%d fmt:%-16s %-16s->%-16s]%s",

libavfilter/avfilter.c:224:1: return from a call to ff_dlog_link
  222.                 end ? "\n" : "");
  223.     }
  224. }
       ^
  225. 
  226. int avfilter_request_frame(AVFilterLink *link)

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

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

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

libavfilter/video.c:153:9: 
151. 
152.     if (!ret)
153.         ret = ff_default_get_video_buffer(link, perms, w, h);
             ^
154. 
155.     if (ret)

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

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

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

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

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

libavfilter/video.c:155:9: Taking false branch
153.         ret = ff_default_get_video_buffer(link, perms, w, h);
154. 
155.     if (ret)
             ^
156.         ret->type = AVMEDIA_TYPE_VIDEO;
157. 

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

libavfilter/avfilter.c:202:1: start of procedure ff_dlog_link()
  200. }
  201. 
  202. void ff_dlog_link(void *ctx, AVFilterLink *link, int end)
       ^
  203. {
  204.     if (link->type == AVMEDIA_TYPE_VIDEO) {

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

libavfilter/avfilter.c:214:9: Skipping av_get_channel_layout_string(): empty list of specs
  212.     } else {
  213.         char buf[128];
  214.         av_get_channel_layout_string(buf, sizeof(buf), -1, link->channel_layout);
               ^
  215. 
  216.         av_dlog(ctx,

libavfilter/avfilter.c:204:5: 
  202. void ff_dlog_link(void *ctx, AVFilterLink *link, int end)
  203. {
  204.     if (link->type == AVMEDIA_TYPE_VIDEO) {
           ^
  205.         av_dlog(ctx,
  206.                 "link[%p s:%dx%d fmt:%-16s %-16s->%-16s]%s",

libavfilter/avfilter.c:224:1: return from a call to ff_dlog_link
  222.                 end ? "\n" : "");
  223.     }
  224. }
       ^
  225. 
  226. int avfilter_request_frame(AVFilterLink *link)

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

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

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