diff --git a/libavfilter/vf_libopencv.c b/libavfilter/vf_libopencv.c
index 1b8a5dcc574bab113efbdb1ab0de83c0b799c0ff..2d26b380378860caccb8462027e1717641bc398b 100644
--- a/libavfilter/vf_libopencv.c
+++ b/libavfilter/vf_libopencv.c
@@ -177,7 +177,7 @@ static int read_shape_from_file(int *cols, int *rows, int **values, const char *
                 p++;
                 break;
             } else
-                (*values)[*cols*i + j] = !!isgraph(*(p++));
+                (*values)[*cols*i + j] = !!av_isgraph(*(p++));
         }
     }
     av_file_unmap(buf, size);