libavfilter/vf_vflip.c:54: error: Null Dereference
  pointer `picref` last assigned on line 48 could be null and is dereferenced at line 54, column 13.

libavfilter/vf_vflip.c:42:1: start of procedure get_video_buffer()
40. }
41. 
42. static AVFilterBufferRef *get_video_buffer(AVFilterLink *link, int perms,
    ^
43.                                         int w, int h)
44. {

libavfilter/vf_vflip.c:45:5: 
43.                                         int w, int h)
44. {
45.     FlipContext *flip = link->dst->priv;
        ^
46.     int i;
47. 

libavfilter/vf_vflip.c:48:5: 
46.     int i;
47. 
48.     AVFilterBufferRef *picref = avfilter_get_video_buffer(link->dst->outputs[0],
        ^
49.                                                        perms, w, h);
50. 

libavfilter/avfilter.c:217:1: start of procedure avfilter_get_video_buffer()
  215. }
  216. 
  217. AVFilterBufferRef *avfilter_get_video_buffer(AVFilterLink *link, int perms, int w, int h)
       ^
  218. {
  219.     AVFilterBufferRef *ret = NULL;

libavfilter/avfilter.c:219:5: 
  217. AVFilterBufferRef *avfilter_get_video_buffer(AVFilterLink *link, int perms, int w, int h)
  218. {
  219.     AVFilterBufferRef *ret = NULL;
           ^
  220. 
  221.     FF_DPRINTF_START(NULL, get_video_buffer); ff_dprintf_link(NULL, link, 0); dprintf(NULL, " perms:%d w:%d h:%d\n", perms, w, h);

libavfilter/avfilter.c:221:47: 
  219.     AVFilterBufferRef *ret = NULL;
  220. 
  221.     FF_DPRINTF_START(NULL, get_video_buffer); ff_dprintf_link(NULL, link, 0); dprintf(NULL, " perms:%d w:%d h:%d\n", perms, w, h);
                                                     ^
  222. 
  223.     if (link_dpad(link).get_video_buffer)

libavfilter/avfilter.c:206:1: start of procedure ff_dprintf_link()
    204. }
    205. 
    206. void ff_dprintf_link(void *ctx, AVFilterLink *link, int end)
         ^
    207. {
    208.     dprintf(ctx,

libavfilter/avfilter.c:215:1: return from a call to ff_dprintf_link
    213.             link->dst ? link->dst->filter->name : "",
    214.             end ? "\n" : "");
    215. }
         ^
    216. 
    217. AVFilterBufferRef *avfilter_get_video_buffer(AVFilterLink *link, int perms, int w, int h)

libavfilter/avfilter.c:223:9: Taking true branch
  221.     FF_DPRINTF_START(NULL, get_video_buffer); ff_dprintf_link(NULL, link, 0); dprintf(NULL, " perms:%d w:%d h:%d\n", perms, w, h);
  222. 
  223.     if (link_dpad(link).get_video_buffer)
               ^
  224.         ret = link_dpad(link).get_video_buffer(link, perms, w, h);
  225. 

libavfilter/avfilter.c:224:9: Skipping __function_pointer__(): unresolved function pointer
  222. 
  223.     if (link_dpad(link).get_video_buffer)
  224.         ret = link_dpad(link).get_video_buffer(link, perms, w, h);
               ^
  225. 
  226.     if (!ret)

libavfilter/avfilter.c:226:10: Taking true branch
  224.         ret = link_dpad(link).get_video_buffer(link, perms, w, h);
  225. 
  226.     if (!ret)
                ^
  227.         ret = avfilter_default_get_video_buffer(link, perms, w, h);
  228. 

libavfilter/avfilter.c:227:9: Skipping avfilter_default_get_video_buffer(): empty list of specs
  225. 
  226.     if (!ret)
  227.         ret = avfilter_default_get_video_buffer(link, perms, w, h);
               ^
  228. 
  229.     if (ret)

libavfilter/avfilter.c:229:9: Taking false branch
  227.         ret = avfilter_default_get_video_buffer(link, perms, w, h);
  228. 
  229.     if (ret)
               ^
  230.         ret->type = AVMEDIA_TYPE_VIDEO;
  231. 

libavfilter/avfilter.c:232:47: 
  230.         ret->type = AVMEDIA_TYPE_VIDEO;
  231. 
  232.     FF_DPRINTF_START(NULL, get_video_buffer); ff_dprintf_link(NULL, link, 0); dprintf(NULL, " returning "); ff_dprintf_picref(NULL, ret, 1);
                                                     ^
  233. 
  234.     return ret;

libavfilter/avfilter.c:206:1: start of procedure ff_dprintf_link()
    204. }
    205. 
    206. void ff_dprintf_link(void *ctx, AVFilterLink *link, int end)
         ^
    207. {
    208.     dprintf(ctx,

libavfilter/avfilter.c:215:1: return from a call to ff_dprintf_link
    213.             link->dst ? link->dst->filter->name : "",
    214.             end ? "\n" : "");
    215. }
         ^
    216. 
    217. AVFilterBufferRef *avfilter_get_video_buffer(AVFilterLink *link, int perms, int w, int h)

libavfilter/avfilter.c:232:109: 
  230.         ret->type = AVMEDIA_TYPE_VIDEO;
  231. 
  232.     FF_DPRINTF_START(NULL, get_video_buffer); ff_dprintf_link(NULL, link, 0); dprintf(NULL, " returning "); ff_dprintf_picref(NULL, ret, 1);
                                                                                                                   ^
  233. 
  234.     return ret;

libavfilter/avfilter.c:194:1: start of procedure ff_dprintf_picref()
    192. }
    193. 
    194. void ff_dprintf_picref(void *ctx, AVFilterBufferRef *picref, int end)
         ^
    195. {
    196.     dprintf(ctx,

libavfilter/avfilter.c:204:1: return from a call to ff_dprintf_picref
    202.             picref->video->pixel_aspect.num, picref->video->pixel_aspect.den, picref->video->w, picref->video->h,
    203.             end ? "\n" : "");
    204. }
         ^
    205. 
    206. void ff_dprintf_link(void *ctx, AVFilterLink *link, int end)

libavfilter/avfilter.c:234:5: 
  232.     FF_DPRINTF_START(NULL, get_video_buffer); ff_dprintf_link(NULL, link, 0); dprintf(NULL, " returning "); ff_dprintf_picref(NULL, ret, 1);
  233. 
  234.     return ret;
           ^
  235. }
  236. 

libavfilter/avfilter.c:235:1: return from a call to avfilter_get_video_buffer
  233. 
  234.     return ret;
  235. }
       ^
  236. 
  237. AVFilterBufferRef *avfilter_get_audio_buffer(AVFilterLink *link, int perms,

libavfilter/vf_vflip.c:51:10: 
49.                                                        perms, w, h);
50. 
51.     for (i = 0; i < 4; i ++) {
             ^
52.         int vsub = i == 1 || i == 2 ? flip->vsub : 0;
53. 

libavfilter/vf_vflip.c:51:17: Loop condition is true. Entering loop body
49.                                                        perms, w, h);
50. 
51.     for (i = 0; i < 4; i ++) {
                    ^
52.         int vsub = i == 1 || i == 2 ? flip->vsub : 0;
53. 

libavfilter/vf_vflip.c:52:20: Condition is false
50. 
51.     for (i = 0; i < 4; i ++) {
52.         int vsub = i == 1 || i == 2 ? flip->vsub : 0;
                       ^
53. 
54.         if (picref->data[i]) {

libavfilter/vf_vflip.c:52:30: Condition is false
50. 
51.     for (i = 0; i < 4; i ++) {
52.         int vsub = i == 1 || i == 2 ? flip->vsub : 0;
                                 ^
53. 
54.         if (picref->data[i]) {

libavfilter/vf_vflip.c:52:20: 
50. 
51.     for (i = 0; i < 4; i ++) {
52.         int vsub = i == 1 || i == 2 ? flip->vsub : 0;
                       ^
53. 
54.         if (picref->data[i]) {

libavfilter/vf_vflip.c:52:9: 
50. 
51.     for (i = 0; i < 4; i ++) {
52.         int vsub = i == 1 || i == 2 ? flip->vsub : 0;
            ^
53. 
54.         if (picref->data[i]) {

libavfilter/vf_vflip.c:54:13: Taking false branch
52.         int vsub = i == 1 || i == 2 ? flip->vsub : 0;
53. 
54.         if (picref->data[i]) {
                ^
55.             picref->data[i] += ((h >> vsub)-1) * picref->linesize[i];
56.             picref->linesize[i] = -picref->linesize[i];

static AVFilterBufferRef *get_video_buffer(AVFilterLink *link, int perms,
                                        int w, int h)
{
    FlipContext *flip = link->dst->priv;
    int i;
    AVFilterBufferRef *picref = avfilter_get_video_buffer(link->dst->outputs[0],
                                                       perms, w, h);
    for (i = 0; i < 4; i ++) {
        int vsub = i == 1 || i == 2 ? flip->vsub : 0;
        if (picref->data[i]) {
            picref->data[i] += ((h >> vsub)-1) * picref->linesize[i];
            picref->linesize[i] = -picref->linesize[i];
        }
    }
    return picref;
}
['static AVFilterBufferRef *get_video_buffer(AVFilterLink *link, int perms,\n                                        int w, int h)\n{\n    FlipContext *flip = link->dst->priv;\n    int i;\n    AVFilterBufferRef *picref = avfilter_get_video_buffer(link->dst->outputs[0],\n                                                       perms, w, h);\n    for (i = 0; i < 4; i ++) {\n        int vsub = i == 1 || i == 2 ? flip->vsub : 0;\n        if (picref->data[i]) {\n            picref->data[i] += ((h >> vsub)-1) * picref->linesize[i];\n            picref->linesize[i] = -picref->linesize[i];\n        }\n    }\n    return picref;\n}', 'AVFilterBufferRef *avfilter_get_video_buffer(AVFilterLink *link, int perms, int w, int h)\n{\n    AVFilterBufferRef *ret = NULL;\n    FF_DPRINTF_START(NULL, get_video_buffer); ff_dprintf_link(NULL, link, 0); dprintf(NULL, " perms:%d w:%d h:%d\\n", perms, w, h);\n    if (link_dpad(link).get_video_buffer)\n        ret = link_dpad(link).get_video_buffer(link, perms, w, h);\n    if (!ret)\n        ret = avfilter_default_get_video_buffer(link, perms, w, h);\n    if (ret)\n        ret->type = AVMEDIA_TYPE_VIDEO;\n    FF_DPRINTF_START(NULL, get_video_buffer); ff_dprintf_link(NULL, link, 0); dprintf(NULL, " returning "); ff_dprintf_picref(NULL, ret, 1);\n    return ret;\n}', 'void ff_dprintf_link(void *ctx, AVFilterLink *link, int end)\n{\n    dprintf(ctx,\n            "link[%p s:%dx%d fmt:%-16s %-16s->%-16s]%s",\n            link, link->w, link->h,\n            av_pix_fmt_descriptors[link->format].name,\n            link->src ? link->src->filter->name : "",\n            link->dst ? link->dst->filter->name : "",\n            end ? "\\n" : "");\n}', 'void ff_dprintf_picref(void *ctx, AVFilterBufferRef *picref, int end)\n{\n    dprintf(ctx,\n            "picref[%p data[%p, %p, %p, %p] linesize[%d, %d, %d, %d] pts:%"PRId64" pos:%"PRId64" a:%d/%d s:%dx%d]%s",\n            picref,\n            picref->data    [0], picref->data    [1], picref->data    [2], picref->data    [3],\n            picref->linesize[0], picref->linesize[1], picref->linesize[2], picref->linesize[3],\n            picref->pts, picref->pos,\n            picref->video->pixel_aspect.num, picref->video->pixel_aspect.den, picref->video->w, picref->video->h,\n            end ? "\\n" : "");\n}']