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

libavfilter/video.c:124:1: start of procedure avfilter_get_video_buffer()
122. }
123. 
124. AVFilterBufferRef *avfilter_get_video_buffer(AVFilterLink *link, int perms, int w, int h)
     ^
125. {
126.     AVFilterBufferRef *ret = NULL;

libavfilter/video.c:126:5: 
124. AVFilterBufferRef *avfilter_get_video_buffer(AVFilterLink *link, int perms, int w, int h)
125. {
126.     AVFilterBufferRef *ret = NULL;
         ^
127. 
128.     av_unused char buf[16];

libavfilter/video.c:129:47: 
127. 
128.     av_unused char buf[16];
129.     FF_DPRINTF_START(NULL, get_video_buffer); ff_dlog_link(NULL, link, 0);
                                                   ^
130.     av_dlog(NULL, " perms:%s w:%d h:%d\n", ff_get_ref_perms_string(buf, sizeof(buf), perms), w, h);
131. 

libavfilter/avfilter.c:196:1: start of procedure ff_dlog_link()
  194. #endif
  195. 
  196. void ff_dlog_link(void *ctx, AVFilterLink *link, int end)
       ^
  197. {
  198.     if (link->type == AVMEDIA_TYPE_VIDEO) {

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

libavfilter/avfilter.c:208:9: Skipping av_get_channel_layout_string(): empty list of specs
  206.     } else {
  207.         char buf[128];
  208.         av_get_channel_layout_string(buf, sizeof(buf), -1, link->channel_layout);
               ^
  209. 
  210.         av_dlog(ctx,

libavfilter/avfilter.c:198:5: 
  196. void ff_dlog_link(void *ctx, AVFilterLink *link, int end)
  197. {
  198.     if (link->type == AVMEDIA_TYPE_VIDEO) {
           ^
  199.         av_dlog(ctx,
  200.                 "link[%p s:%dx%d fmt:%-16s %-16s->%-16s]%s",

libavfilter/avfilter.c:218:1: return from a call to ff_dlog_link
  216.                 end ? "\n" : "");
  217.     }
  218. }
       ^
  219. 
  220. int avfilter_request_frame(AVFilterLink *link)

libavfilter/video.c:132:9: Taking true branch
130.     av_dlog(NULL, " perms:%s w:%d h:%d\n", ff_get_ref_perms_string(buf, sizeof(buf), perms), w, h);
131. 
132.     if (link->dstpad->get_video_buffer)
             ^
133.         ret = link->dstpad->get_video_buffer(link, perms, w, h);
134. 

libavfilter/video.c:133:9: Skipping __function_pointer__(): unresolved function pointer
131. 
132.     if (link->dstpad->get_video_buffer)
133.         ret = link->dstpad->get_video_buffer(link, perms, w, h);
             ^
134. 
135.     if (!ret)

libavfilter/video.c:135:10: Taking true branch
133.         ret = link->dstpad->get_video_buffer(link, perms, w, h);
134. 
135.     if (!ret)
              ^
136.         ret = avfilter_default_get_video_buffer(link, perms, w, h);
137. 

libavfilter/video.c:136:9: 
134. 
135.     if (!ret)
136.         ret = avfilter_default_get_video_buffer(link, perms, w, h);
             ^
137. 
138.     if (ret)

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

libavfilter/video.c:65:5: 
  63.     int linesize[4];
  64.     uint8_t *data[4];
  65.     AVFilterBufferRef *picref = NULL;
          ^
  66. 
  67.     // +2 is needed for swscaler, +16 to be SIMD-friendly

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

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

libavfilter/video.c:79:1: return from a call to avfilter_default_get_video_buffer
  77. 
  78.     return picref;
  79. }
      ^
  80. 
  81. AVFilterBufferRef *

libavfilter/video.c:138:9: Taking false branch
136.         ret = avfilter_default_get_video_buffer(link, perms, w, h);
137. 
138.     if (ret)
             ^
139.         ret->type = AVMEDIA_TYPE_VIDEO;
140. 

libavfilter/video.c:141:47: 
139.         ret->type = AVMEDIA_TYPE_VIDEO;
140. 
141.     FF_DPRINTF_START(NULL, get_video_buffer); ff_dlog_link(NULL, link, 0); av_dlog(NULL, " returning "); ff_dlog_ref(NULL, ret, 1);
                                                   ^
142. 
143.     return ret;

libavfilter/avfilter.c:196:1: start of procedure ff_dlog_link()
  194. #endif
  195. 
  196. void ff_dlog_link(void *ctx, AVFilterLink *link, int end)
       ^
  197. {
  198.     if (link->type == AVMEDIA_TYPE_VIDEO) {

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

libavfilter/avfilter.c:208:9: Skipping av_get_channel_layout_string(): empty list of specs
  206.     } else {
  207.         char buf[128];
  208.         av_get_channel_layout_string(buf, sizeof(buf), -1, link->channel_layout);
               ^
  209. 
  210.         av_dlog(ctx,

libavfilter/avfilter.c:198:5: 
  196. void ff_dlog_link(void *ctx, AVFilterLink *link, int end)
  197. {
  198.     if (link->type == AVMEDIA_TYPE_VIDEO) {
           ^
  199.         av_dlog(ctx,
  200.                 "link[%p s:%dx%d fmt:%-16s %-16s->%-16s]%s",

libavfilter/avfilter.c:218:1: return from a call to ff_dlog_link
  216.                 end ? "\n" : "");
  217.     }
  218. }
       ^
  219. 
  220. int avfilter_request_frame(AVFilterLink *link)

libavfilter/video.c:141:106: 
139.         ret->type = AVMEDIA_TYPE_VIDEO;
140. 
141.     FF_DPRINTF_START(NULL, get_video_buffer); ff_dlog_link(NULL, link, 0); av_dlog(NULL, " returning "); ff_dlog_ref(NULL, ret, 1);
                                                                                                              ^
142. 
143.     return ret;

libavfilter/video.c:24:1: start of procedure ff_dlog_ref()
  22. #include "internal.h"
  23. 
  24. static void ff_dlog_ref(void *ctx, AVFilterBufferRef *ref, int end)
      ^
  25. {
  26.     av_unused char buf[16];

libavfilter/video.c:33:9: Taking false branch
  31.             ref->pts, ref->pos);
  32. 
  33.     if (ref->video) {
              ^
  34.         av_dlog(ctx, " a:%d/%d s:%dx%d i:%c iskey:%d type:%c",
  35.                 ref->video->pixel_aspect.num, ref->video->pixel_aspect.den,
